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
commit cb3fe2610d1d991f00b17a8b174016aeac66e951 Author: Jacques Le Roux <jacques.le.r...@les7arts.com> AuthorDate: Tue Oct 18 14:14:41 2022 +0200 Fixed: EntityPerformanceTest.groovy shows error in log (OFBIZ-12706) In previous commit: "Conflict handled by hand" but merge did not went so well, this fixes it --- .../apache/ofbiz/base/util/cache/UtilCache.java | 23 +++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) 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 be969effab..caa29bb845 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 @@ -152,21 +152,22 @@ public final class UtilCache<K, V> implements Serializable, EvictionListener<Obj 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); - if (res.containsKey(key)) { - try { - return res.getString(key); - } catch (MissingResourceException e) { + try { + for (String propName : propNames) { + String key = propName.concat(".").concat(parameter); + if (res.containsKey(key)) { + try { + return res.getString(key); + } catch (MissingResourceException e) { + } } } + } catch (Exception e) { + Debug.logWarning(e, "Error getting " + parameter + " value from ResourceBundle for propNames: " + Arrays.toString(propNames), MODULE); } - } catch (Exception e) { - Debug.logWarning(e, "Error getting " + parameter + " value from ResourceBundle for propNames: " + Arrays.toString(propNames), MODULE); } - return null; - } + return null; + } protected void setPropertiesParams(String cacheName) { setPropertiesParams(new String[] {cacheName});