svn commit: r585571 - /ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/cache/CacheLineTable.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r585571 - /ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/cache/CacheLineTable.java

doogie-3
Author: doogie
Date: Wed Oct 17 09:50:03 2007
New Revision: 585571

URL: http://svn.apache.org/viewvc?rev=585571&view=rev
Log:
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) {