Files
ofbiz-framework/framework/base
Jacopo Cappellato c60e7870fd Added new method "putIfAbsentAndGet" to UtilCache: it is similar to putIfAbsent but it always return the value even if the value was missing and added to the cache by method.
This can be useful to improve code like:

cache.putIfAbsent("key", "value");
value = cache.get("key"); // if a concurrent thread has cleared the cache the value could be null

into this:

value = cache.putIfAbsentAndGet("key", "value");



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1340351 13f79535-47bb-0310-9956-ffa450edef68
2012-05-19 06:36:41 +00:00
..