svn commit: r1617480 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityUtilProperties.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1617480 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityUtilProperties.java

jacopoc
Author: jacopoc
Date: Tue Aug 12 14:12:30 2014
New Revision: 1617480

URL: http://svn.apache.org/r1617480
Log:
Fix for a typo and an important optimization: enabled cache lookup for the retrieval of SystemProperty records.

Modified:
    ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityUtilProperties.java

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityUtilProperties.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityUtilProperties.java?rev=1617480&r1=1617479&r2=1617480&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityUtilProperties.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityUtilProperties.java Tue Aug 12 14:12:30 2014
@@ -55,15 +55,15 @@ public class EntityUtilProperties implem
         
         // find system property
         try {
-            GenericValue systemProperty = delegator.findOne("SystemProperty", UtilMisc.toMap("systemResourceId", resource, "systemPropertyId", name), false);
-            if (UtilValidate.isNotEmpty(systemProperty)) {
+            GenericValue systemProperty = delegator.findOne("SystemProperty", UtilMisc.toMap("systemResourceId", resource, "systemPropertyId", name), true);
+            if (systemProperty != null) {
                 String systemPropertyValue = systemProperty.getString("systemPropertyValue");
                 if (UtilValidate.isNotEmpty(systemPropertyValue)) {
                     return systemPropertyValue;
                 }
             }
         } catch (Exception e) {
-            Debug.logWarning("Could not get a sytem property for " + name + " : " + e.getMessage(), module);
+            Debug.logWarning("Could not get a system property for " + name + " : " + e.getMessage(), module);
         }
         return null;
     }