jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r552866 - in /jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy: ChildNodeEntriesImpl.java ChildPropertyEntriesImpl.java
Date Tue, 03 Jul 2007 14:59:41 GMT
Author: angela
Date: Tue Jul  3 07:59:40 2007
New Revision: 552866

URL: http://svn.apache.org/viewvc?view=rev&rev=552866
Log:
minor improvement

Modified:
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ChildNodeEntriesImpl.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ChildPropertyEntriesImpl.java

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ChildNodeEntriesImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ChildNodeEntriesImpl.java?view=diff&rev=552866&r1=552865&r2=552866
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ChildNodeEntriesImpl.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ChildNodeEntriesImpl.java
Tue Jul  3 07:59:40 2007
@@ -36,6 +36,7 @@
 import java.util.HashMap;
 import java.util.Collections;
 import java.lang.ref.WeakReference;
+import java.lang.ref.Reference;
 
 /**
  * <code>ChildNodeEntriesImpl</code> implements a memory sensitive implementation
@@ -511,7 +512,7 @@
             }
 
             protected Object getValue() {
-                WeakReference val = (WeakReference) super.getValue();
+                Reference val = (Reference) super.getValue();
                 // if the nodeEntry has been g-collected in the mean time
                 // create a new NodeEntry in order to avoid returning null.
                 NodeEntry ne = (val == null) ?  null : (NodeEntry) val.get();

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ChildPropertyEntriesImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ChildPropertyEntriesImpl.java?view=diff&rev=552866&r1=552865&r2=552866
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ChildPropertyEntriesImpl.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ChildPropertyEntriesImpl.java
Tue Jul  3 07:59:40 2007
@@ -98,7 +98,7 @@
      * @see ChildPropertyEntries#add(PropertyEntry)
      */
     public void add(PropertyEntry propertyEntry) {
-        WeakReference ref = new WeakReference(propertyEntry);
+        Reference ref = new WeakReference(propertyEntry);
         properties.put(propertyEntry.getQName(), ref);
     }
 
@@ -115,10 +115,9 @@
     }
 
     /**
-     * @see ChildPropertyEntries#remove(QName) 
+     * @see ChildPropertyEntries#remove(QName)
      */
     public boolean remove(QName propertyName) {
-        WeakReference ref = (WeakReference) properties.remove(propertyName);
-        return ref != null;
+        return properties.remove(propertyName) != null;
     }
 }



Mime
View raw message