Author: mbrohl Date: Sun Dec 17 11:38:15 2017 New Revision: 1818479 URL: http://svn.apache.org/viewvc?rev=1818479&view=rev Log: Improved: General refactoring and code improvements, package org.apache.ofbiz.widget.cache. (OFBIZ-9948)
Thanks Dennis Balkir for reporting and providing the patch. Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/cache/ScreenCache.java Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/cache/ScreenCache.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/cache/ScreenCache.java?rev=1818479&r1=1818478&r2=1818479&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/cache/ScreenCache.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/cache/ScreenCache.java Sun Dec 17 11:38:15 2017 @@ -30,7 +30,9 @@ public class ScreenCache extends Abstrac public GenericWidgetOutput get(String screenName, WidgetContextCacheKey wcck) { UtilCache<WidgetContextCacheKey,GenericWidgetOutput> screenCache = getCache(screenName); - if (screenCache == null) return null; + if (screenCache == null) { + return null; + } return screenCache.get(wcck); } @@ -41,10 +43,16 @@ public class ScreenCache extends Abstrac public GenericWidgetOutput remove(String screenName, WidgetContextCacheKey wcck) { UtilCache<WidgetContextCacheKey,GenericWidgetOutput> screenCache = getCache(screenName); - if (Debug.verboseOn()) Debug.logVerbose("Removing from ScreenCache with key [" + wcck + "], will remove from this cache: " + (screenCache == null ? "[No cache found to remove from]" : screenCache.getName()), module); - if (screenCache == null) return null; + if (Debug.verboseOn()) { + Debug.logVerbose("Removing from ScreenCache with key [" + wcck + "], will remove from this cache: " + (screenCache == null ? "[No cache found to remove from]" : screenCache.getName()), module); + } + if (screenCache == null) { + return null; + } GenericWidgetOutput retVal = screenCache.remove(wcck); - if (Debug.verboseOn()) Debug.logVerbose("Removing from ScreenCache with key [" + wcck + "], found this in the cache: " + retVal, module); + if (Debug.verboseOn()) { + Debug.logVerbose("Removing from ScreenCache with key [" + wcck + "], found this in the cache: " + retVal, module); + } return retVal; } }