jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r599184 - /jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/NodeInfoImpl.java
Date Wed, 28 Nov 2007 23:02:41 GMT
Author: jukka
Date: Wed Nov 28 15:02:41 2007
New Revision: 599184

URL: http://svn.apache.org/viewvc?rev=599184&view=rev
Log:
JCR-1181: Avoid using the deprecated IteratorHelper

Modified:
    jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/NodeInfoImpl.java

Modified: jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/NodeInfoImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/NodeInfoImpl.java?rev=599184&r1=599183&r2=599184&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/NodeInfoImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/NodeInfoImpl.java
Wed Nov 28 15:02:41 2007
@@ -22,7 +22,6 @@
 import org.apache.jackrabbit.spi.IdFactory;
 import org.apache.jackrabbit.spi.Name;
 import org.apache.jackrabbit.spi.Path;
-import org.apache.jackrabbit.util.IteratorHelper;
 
 import java.util.List;
 import java.util.ArrayList;
@@ -92,18 +91,25 @@
             }
             NodeId nodeId = nodeInfo.getId();
             nodeId = idFactory.createNodeId(nodeId.getUniqueID(), nodeId.getPath());
+            final Iterator propIds = nodeInfo.getPropertyIds();
             return new NodeInfoImpl(parentId, nodeInfo.getName(),
                     nodeInfo.getPath(), nodeId,
                     nodeInfo.getIndex(), nodeInfo.getNodetype(),
                     nodeInfo.getMixins(), serRefs.iterator(),
-                    new IteratorHelper(nodeInfo.getPropertyIds()) {
+                    new Iterator() {
+                        public boolean hasNext() {
+                            return propIds.hasNext();
+                        }
                         public Object next() {
-                            PropertyId propId = (PropertyId) super.next();
+                            PropertyId propId = (PropertyId) propIds.next();
                             NodeId parentId = propId.getParentId();
                             idFactory.createNodeId(
                                     parentId.getUniqueID(), parentId.getPath());
                             return idFactory.createPropertyId(
                                     parentId, propId.getName());
+                        }
+                        public void remove() {
+                            throw new UnsupportedOperationException();
                         }
                     });
         }



Mime
View raw message