提交 c9fd1f55 authored 作者: Thomas Mueller's avatar Thomas Mueller

The H2 JDBC client can now be used in an unsigned Applet. The problem was that…

The H2 JDBC client can now be used in an unsigned Applet. The problem was that System.getProperty throws a SecurityException, which is now ignored.
上级 c286e667
......@@ -241,7 +241,7 @@ public class ValueLob extends Value {
private static int getNewObjectId(DataHandler h) {
String path = h.getDatabasePath();
if ((path != null) && (path.length() == 0)) {
path = new File(System.getProperty("java.io.tmpdir"), SysProperties.PREFIX_TEMP_FILE).getAbsolutePath();
path = new File(Utils.getProperty("java.io.tmpdir", "."), SysProperties.PREFIX_TEMP_FILE).getAbsolutePath();
}
int newId = 0;
int lobsPerDir = SysProperties.LOB_FILES_PER_DIRECTORY;
......@@ -385,7 +385,7 @@ public class ValueLob extends Value {
synchronized (h) {
String path = h.getDatabasePath();
if ((path != null) && (path.length() == 0)) {
path = new File(System.getProperty("java.io.tmpdir"), SysProperties.PREFIX_TEMP_FILE).getAbsolutePath();
path = new File(Utils.getProperty("java.io.tmpdir", "."), SysProperties.PREFIX_TEMP_FILE).getAbsolutePath();
}
objectId = getNewObjectId(h);
fileName = getFileNamePrefix(path, objectId) + Constants.SUFFIX_TEMP_FILE;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论