diff --git a/.classpath b/.classpath index 3a1f02e..bc560b0 100644 --- a/.classpath +++ b/.classpath @@ -19,12 +19,13 @@ - + + diff --git a/lib/devinsy-strings-0.4.4-sources.zip b/lib/devinsy-strings-0.4.4-sources.zip new file mode 100644 index 0000000..8ccb845 Binary files /dev/null and b/lib/devinsy-strings-0.4.4-sources.zip differ diff --git a/lib/devinsy-strings-0.4.4.jar b/lib/devinsy-strings-0.4.4.jar new file mode 100644 index 0000000..01ced79 Binary files /dev/null and b/lib/devinsy-strings-0.4.4.jar differ diff --git a/lib/devinsy-utils-0.3.3-sources.zip b/lib/devinsy-utils-0.3.3-sources.zip deleted file mode 100644 index 647b15d..0000000 Binary files a/lib/devinsy-utils-0.3.3-sources.zip and /dev/null differ diff --git a/lib/devinsy-utils-0.3.3.jar b/lib/devinsy-utils-0.3.3.jar deleted file mode 100644 index 834d81a..0000000 Binary files a/lib/devinsy-utils-0.3.3.jar and /dev/null differ diff --git a/lib/devinsy-xml-0.4.2-sources.zip b/lib/devinsy-xml-0.4.2-sources.zip new file mode 100644 index 0000000..97b2e14 Binary files /dev/null and b/lib/devinsy-xml-0.4.2-sources.zip differ diff --git a/lib/devinsy-xml-0.4.2.jar b/lib/devinsy-xml-0.4.2.jar new file mode 100644 index 0000000..98be2c0 Binary files /dev/null and b/lib/devinsy-xml-0.4.2.jar differ diff --git a/src/fr/devinsy/sikevadb/filetree/FileTreeSikevaDB.java b/src/fr/devinsy/sikevadb/filetree/FileTreeSikevaDB.java index 7f15e75..e17e3ef 100644 --- a/src/fr/devinsy/sikevadb/filetree/FileTreeSikevaDB.java +++ b/src/fr/devinsy/sikevadb/filetree/FileTreeSikevaDB.java @@ -36,8 +36,8 @@ import fr.devinsy.sikevadb.core.Elements; import fr.devinsy.sikevadb.core.OpenedDatabaseException; import fr.devinsy.sikevadb.core.SikevaDB; import fr.devinsy.sikevadb.core.SikevaDBException; -import fr.devinsy.util.ToolBox; import fr.devinsy.util.strings.StringList; +import fr.devinsy.util.strings.StringsUtils; /** * The Class FileTreeSikevaDB. @@ -475,7 +475,7 @@ public class FileTreeSikevaDB implements SikevaDB { throw new SikevaDBException("Invalid config directory (blank), destroy operation is cancelled."); } - else if (ToolBox.matchesAny(databaseHome, "/", "/root", "/usr", "/home", "/tmp", "/var", "/srv", "/boot")) + else if (StringsUtils.equalsAny(databaseHome, "/", "/root", "/usr", "/home", "/tmp", "/var", "/srv", "/boot")) { throw new SikevaDBException("Invalid home directory (system file), destroy operation is cancelled."); } diff --git a/src/fr/devinsy/sikevadb/sql/SQLSikevaDBTools.java b/src/fr/devinsy/sikevadb/sql/SQLSikevaDBTools.java index 25a96ac..2f8b4d5 100644 --- a/src/fr/devinsy/sikevadb/sql/SQLSikevaDBTools.java +++ b/src/fr/devinsy/sikevadb/sql/SQLSikevaDBTools.java @@ -24,12 +24,12 @@ import java.io.StringReader; import java.net.URL; import java.util.Date; +import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.StringUtils; import org.joda.time.DateTime; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import fr.devinsy.util.FileTools; import fr.devinsy.util.strings.StringList; /** @@ -54,7 +54,7 @@ public class SQLSikevaDBTools { StringList result; - String script = FileTools.load(source); + String script = IOUtils.toString(source); result = splitSQLCommands(script); @@ -98,22 +98,16 @@ public class SQLSikevaDBTools { if ((StringUtils.isNotBlank(line)) && (!line.startsWith("--"))) { - // if (line.endsWith(";")) { - // sql.append(line.substring(0, line.length() - 1)); - // result.add(sql.toString()); - // sql.clear(); - } else { - // sql.append(line).append(' '); } }