gilPts commented on code in PR #634:
URL: https://github.com/apache/ofbiz-framework/pull/634#discussion_r1186220896


##########
framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityUtilProperties.java:
##########
@@ -123,6 +123,117 @@ public static String 
getPropertyValueFromDelegatorName(String resource, String n
         }
     }
 
+    public static <T> Object getPropertyValue(String resource, String name, 
Object defaultValue, Delegator delegator, Class<T> clazz) {
+        Map<String, String> propMap = getSystemPropertyValue(resource, name, 
delegator);
+        if ("Y".equals(propMap.get("isExistInDb"))) {
+            String s = propMap.get("value");
+            if (UtilValidate.isEmpty(s)) {
+                return defaultValue;
+            }
+            try {
+                if (clazz.componentType() == Integer.class) {

Review Comment:
   Hello, since it is for trunk and java 17 is available, what do you think 
about using switch pattern matching (and Guarded Pattern) 
   ref : https://openjdk.org/jeps/406
   Thanks and regards, 
   Gil



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@ofbiz.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to