db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r1470551 - in /db/derby/code/trunk/java/engine/org/apache/derby: iapi/services/property/PropertyUtil.java impl/store/access/PropertyConglomerate.java
Date Mon, 22 Apr 2013 14:41:38 GMT
Author: rhillegas
Date: Mon Apr 22 14:41:38 2013
New Revision: 1470551

URL: http://svn.apache.org/r1470551
Log:
DERBY-6166: Encapsulate the list of service properties.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/property/PropertyUtil.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/PropertyConglomerate.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/property/PropertyUtil.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/property/PropertyUtil.java?rev=1470551&r1=1470550&r2=1470551&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/property/PropertyUtil.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/property/PropertyUtil.java
Mon Apr 22 14:41:38 2013
@@ -25,6 +25,7 @@ import org.apache.derby.iapi.reference.P
 import org.apache.derby.iapi.reference.SQLState;
 import org.apache.derby.iapi.reference.Attribute;
 import org.apache.derby.iapi.reference.EngineType;
+import org.apache.derby.iapi.services.io.ArrayUtil;
 import org.apache.derby.iapi.services.monitor.Monitor;
 import org.apache.derby.iapi.services.monitor.ModuleFactory;
 import org.apache.derby.iapi.error.StandardException;
@@ -66,7 +67,7 @@ import java.util.Enumeration;
 public class PropertyUtil {
 
 	// List of properties that are stored in the service.properties file
-	public static final String[] servicePropertyList = {
+	private static final String[] servicePropertyList = {
 		EngineType.PROPERTY,
 		Property.NO_AUTO_BOOT,
 		Property.STORAGE_TEMP_DIRECTORY,
@@ -142,6 +143,12 @@ public class PropertyUtil {
 
 		return dbOnly;
 	}
+
+    /** Get the list of properties which are normally stored in service.properties */
+    public  static  String[]    getServicePropertyList()
+    {
+        return ArrayUtil.copy( servicePropertyList );
+    }
 	
 	/**
 		Find a system wide property.

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/PropertyConglomerate.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/PropertyConglomerate.java?rev=1470551&r1=1470550&r2=1470551&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/PropertyConglomerate.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/PropertyConglomerate.java
Mon Apr 22 14:41:38 2013
@@ -727,10 +727,11 @@ class PropertyConglomerate
 		scan.close();
 
 		// add the known properties from the service properties set
-		for (int i = 0; i < PropertyUtil.servicePropertyList.length; i++) {
+        String[]    servicePropertyList = PropertyUtil.getServicePropertyList();
+		for (int i = 0; i < servicePropertyList.length; i++) {
 			String value =
-				serviceProperties.getProperty(PropertyUtil.servicePropertyList[i]);
-			if (value != null) set.put(PropertyUtil.servicePropertyList[i], value);
+				serviceProperties.getProperty(servicePropertyList[i]);
+			if (value != null) set.put(servicePropertyList[i], value);
 		}
 		return set;
 	}



Mime
View raw message