You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2022/10/18 09:53:12 UTC

[ofbiz-framework] branch release22.01 updated: Fixed: EntityPerformanceTest.groovy shows error in log (OFBIZ-12706)

This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch release22.01
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/release22.01 by this push:
     new a7637037cc Fixed: EntityPerformanceTest.groovy shows error in log (OFBIZ-12706)
a7637037cc is described below

commit a7637037cc6338f8b1ed0eb3d342bb9a64342e37
Author: Jacques Le Roux <ja...@les7arts.com>
AuthorDate: Tue Oct 18 11:44:27 2022 +0200

    Fixed: EntityPerformanceTest.groovy shows error in log (OFBIZ-12706)
    
    propNames String Array can be empty of the 1st element can be null.
    
    In the case of the calling by EntityPerformanceTest the 1st element is null.
    
    Conflict handled by hand
---
 .../src/main/java/org/apache/ofbiz/base/util/cache/UtilCache.java     | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/framework/base/src/main/java/org/apache/ofbiz/base/util/cache/UtilCache.java b/framework/base/src/main/java/org/apache/ofbiz/base/util/cache/UtilCache.java
index dace45081b..be969effab 100644
--- a/framework/base/src/main/java/org/apache/ofbiz/base/util/cache/UtilCache.java
+++ b/framework/base/src/main/java/org/apache/ofbiz/base/util/cache/UtilCache.java
@@ -38,6 +38,7 @@ import java.util.concurrent.CopyOnWriteArraySet;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.AtomicLong;
+import java.util.stream.Stream;
 
 import org.apache.ofbiz.base.concurrent.ExecutionPool;
 import org.apache.ofbiz.base.util.Debug;
@@ -149,7 +150,8 @@ public final class UtilCache<K, V> implements Serializable, EvictionListener<Obj
         return i == 0 ? "" : Integer.toString(i);
     }
 
-    public static String getPropertyParam(ResourceBundle res, String[] propNames, String parameter) {
+    private static String getPropertyParam(ResourceBundle res, String[] propNames, String parameter) {
+        if (!Stream.of(propNames).anyMatch(string -> string == null || string.isEmpty())) {
         try {
             for (String propName : propNames) {
                 String key = propName.concat(".").concat(parameter);