Replaced devinsy-utils jar with devinsy-strings and devinsy-xml jars.
This commit is contained in:
parent
f68fb63e97
commit
96ec235e9a
9 changed files with 6 additions and 11 deletions
|
@ -19,12 +19,13 @@
|
|||
<classpathentry kind="lib" path="lib/joda-time-2.3.jar" sourcepath="lib/joda-time-2.3-sources.jar"/>
|
||||
<classpathentry kind="lib" path="lib/commons-io-2.4-sources.jar"/>
|
||||
<classpathentry kind="lib" path="lib/commons-io-2.4.jar" sourcepath="lib/commons-io-2.4-sources.jar"/>
|
||||
<classpathentry kind="lib" path="lib/devinsy-utils-0.3.3.jar" sourcepath="lib/devinsy-utils-0.3.3-sources.zip"/>
|
||||
<classpathentry kind="lib" path="lib/Logs/log4j-1.2.17.jar"/>
|
||||
<classpathentry kind="lib" path="lib/Logs/slf4j-api-1.7.5.jar" sourcepath="lib/Logs/slf4j-api-1.7.5-sources.jar"/>
|
||||
<classpathentry kind="lib" path="lib/Logs/slf4j-log4j12-1.7.5.jar"/>
|
||||
<classpathentry kind="lib" path="lib/UnitTesting/hamcrest-core-1.3.jar"/>
|
||||
<classpathentry kind="lib" path="lib/UnitTesting/junit-4.11.jar"/>
|
||||
<classpathentry kind="lib" path="lib/hsqldb-2.3.0.jar"/>
|
||||
<classpathentry kind="lib" path="lib/devinsy-strings-0.4.4.jar" sourcepath="lib/devinsy-strings-0.4.4-sources.zip"/>
|
||||
<classpathentry kind="lib" path="lib/devinsy-xml-0.4.2.jar" sourcepath="lib/devinsy-xml-0.4.2-sources.zip"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
|
BIN
lib/devinsy-strings-0.4.4-sources.zip
Normal file
BIN
lib/devinsy-strings-0.4.4-sources.zip
Normal file
Binary file not shown.
BIN
lib/devinsy-strings-0.4.4.jar
Normal file
BIN
lib/devinsy-strings-0.4.4.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
lib/devinsy-xml-0.4.2-sources.zip
Normal file
BIN
lib/devinsy-xml-0.4.2-sources.zip
Normal file
Binary file not shown.
BIN
lib/devinsy-xml-0.4.2.jar
Normal file
BIN
lib/devinsy-xml-0.4.2.jar
Normal file
Binary file not shown.
|
@ -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.");
|
||||
}
|
||||
|
|
|
@ -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(' ');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue