Skip to content

Commit

Permalink
core code updates - Java methods used in routines must now be in hsql…
Browse files Browse the repository at this point in the history
…db.method_class_names value string

git-svn-id: http://svn.code.sf.net/p/hsqldb/svn/base/trunk@6614 7c7dc5f5-a22d-0410-a3af-b41755a11667
  • Loading branch information
Fred Toussi committed Sep 27, 2022
1 parent b21473d commit b6719c6
Showing 1 changed file with 4 additions and 21 deletions.
25 changes: 4 additions & 21 deletions src/org/hsqldb/persist/HsqlDatabaseProperties.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
* Manages a .properties file for a database.
*
* @author Fred Toussi (fredt@users dot sourceforge.net)
* @version 2.7.0
* @version 2.7.1
* @since 1.7.0
*/
public class HsqlDatabaseProperties extends HsqlProperties {
Expand All @@ -58,16 +58,15 @@ public class HsqlDatabaseProperties extends HsqlProperties {
"textdb.allow_full_path";
public static final String hsqldb_reconfig_logging =
"hsqldb.reconfig_logging";
public static String methodClassNames;
private static HashSet accessibleJavaMethodNames;
public static String methodClassNames;
private static final HashSet accessibleJavaMethodNames = new HashSet();
private static boolean allowFullPath;

static {
try {
methodClassNames = System.getProperty(hsqldb_method_class_names);

if (methodClassNames != null) {
accessibleJavaMethodNames = new HashSet();

String[] names = StringUtil.split(methodClassNames, ";");

Expand All @@ -88,7 +87,7 @@ public class HsqlDatabaseProperties extends HsqlProperties {

/**
* If the system property "hsqldb.method_class_names" is not set, then
* static methods of all available Java classes can be accessed as functions
* static methods of available Java classes cannot be accessed as functions
* in HSQLDB. If the property is set, then only the list of semicolon
* separated method names becomes accessible. An empty property value means
* no class is accessible.<p>
Expand All @@ -103,10 +102,6 @@ public class HsqlDatabaseProperties extends HsqlProperties {
*/
public static boolean supportsJavaMethod(String name) {

if (accessibleJavaMethodNames == null) {
return true;
}

if (name.startsWith("java.lang.Math.")) {
return true;
}
Expand Down Expand Up @@ -164,24 +159,12 @@ public static boolean supportsJavaMethod(String name) {
public static final String VERSION_STRING_1_8_0 = "1.8.0";
public static final String PRODUCT_NAME = "HSQL Database Engine";

//#ifdef JAVA8
public static final String THIS_VERSION = "2.7.0";
public static final String THIS_FULL_VERSION = "2.7.0";
public static final int MAJOR = 2,
MINOR = 7,
REVISION = 0;

//#else
/*
public static final String THIS_VERSION = "2.3.9";
public static final String THIS_FULL_VERSION = "2.3.9";
public static final int MAJOR = 2,
MINOR = 3,
REVISION = 9;
*/

//#endif JAVA8

/**
* system properties supported by HSQLDB
*/
Expand Down

0 comments on commit b6719c6

Please sign in to comment.