src/share/classes/java/lang/ref/SoftReference.java

Print this page
rev 905 : imported patch ref

@@ -106,10 +106,11 @@
      * @return   The object to which this reference refers, or
      *           <code>null</code> if this reference object has been cleared
      */
     public T get() {
         T o = super.get();
-        if (o != null) this.timestamp = clock;
+        if (o != null && this.timestamp != clock) 
+            this.timestamp = clock;
         return o;
     }
 
 }