Author: doogie
Date: Wed Oct 17 09:50:03 2007
New Revision: 585571
URL:
http://svn.apache.org/viewvc?rev=585571&view=revLog:
Remove was returning the *new* object, instead of the *old*. Closes
https://issues.apache.org/jira/browse/OFBIZ-1322.
Modified:
ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/cache/CacheLineTable.java
Modified: ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/cache/CacheLineTable.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/cache/CacheLineTable.java?rev=585571&r1=585570&r2=585571&view=diff==============================================================================
--- ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/cache/CacheLineTable.java (original)
+++ ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/cache/CacheLineTable.java Wed Oct 17 09:50:03 2007
@@ -88,16 +88,17 @@
if (Debug.verboseOn()) Debug.logVerbose("In CacheLineTable tried to put with null key, using NullObject" + this.cacheName, module);
key = ObjectType.NULL;
}
- memoryTable.put(key, value);
+ Object oldValue = memoryTable.put(key, value);
if (fileTable != null) {
try {
+ if (oldValue == null) oldValue = fileTable.get(key);
fileTable.put(key, value);
CacheLineTable.jdbmMgr.commit();
} catch (IOException e) {
Debug.logError(e, module);
}
}
- return value;
+ return oldValue;
}
public Object get(Object key) {