jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1167296 - in /jackrabbit/sandbox/jackrabbit-mk: jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/ jackrabbit-spi2microkernel/src/main/java/org/apache/jac...
Date Fri, 09 Sep 2011 17:01:38 GMT
Author: mduerig
Date: Fri Sep  9 17:01:37 2011
New Revision: 1167296

URL: http://svn.apache.org/viewvc?rev=1167296&view=rev
Log:
Microkernel based Jackrabbit prototype (WIP) 
refactor: hide LazyItemIterator

Modified:
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemManagerImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/JcrVersionManager.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/LazyItemIterator.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/SessionImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionHistoryImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SubscriptionImpl.java

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemManagerImpl.java?rev=1167296&r1=1167295&r2=1167296&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemManagerImpl.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemManagerImpl.java
Fri Sep  9 17:01:37 2011
@@ -227,7 +227,7 @@ public class ItemManagerImpl implements 
         session.checkIsAlive();
 
         Iterator<NodeEntry> it = parentEntry.getNodeEntries();
-        return new LazyItemIterator(this, it);
+        return LazyItemIterator.nodeIterator(this, it);
     }
 
     @Override
@@ -256,7 +256,7 @@ public class ItemManagerImpl implements 
         session.checkIsAlive();
 
         Iterator<PropertyEntry> propEntries = parentEntry.getPropertyEntries();
-        return new LazyItemIterator(this, propEntries);
+        return LazyItemIterator.propertyIterator(this, propEntries);
     }
 
     //-------------------------------------------------------------< Object >---

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/JcrVersionManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/JcrVersionManager.java?rev=1167296&r1=1167295&r2=1167296&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/JcrVersionManager.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/JcrVersionManager.java
Fri Sep  9 17:01:37 2011
@@ -184,7 +184,7 @@ public class JcrVersionManager implement
         Iterator<NodeId> failedIds = session.getVersionStateManager().merge((NodeState)
n.getItemState(), srcWorkspace,
                 bestEffort, isShallow);
         
-        return new LazyItemIterator(itemManager, session.getHierarchyManager(), failedIds);
+        return LazyItemIterator.nodeIterator(itemManager, session.getHierarchyManager(),
failedIds);
     }
 
     @Override
@@ -276,7 +276,7 @@ public class JcrVersionManager implement
         session.checkIsAlive();
         NodeImpl activity = getValidActivity(activityNode, "merge");
         Iterator<NodeId> failedIds = vMgr.mergeActivity((NodeState) activity.getItemState());
-        return new LazyItemIterator(itemManager, session.getHierarchyManager(), failedIds);
+        return LazyItemIterator.nodeIterator(itemManager, session.getHierarchyManager(),
failedIds);
     }
 
     /**

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/LazyItemIterator.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/LazyItemIterator.java?rev=1167296&r1=1167295&r2=1167296&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/LazyItemIterator.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/LazyItemIterator.java
Fri Sep  9 17:01:37 2011
@@ -16,10 +16,14 @@
  */
 package org.apache.jackrabbit.jcr2spi;
 
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.NoSuchElementException;
+import org.apache.jackrabbit.jcr2spi.hierarchy.HierarchyEntry;
+import org.apache.jackrabbit.jcr2spi.hierarchy.HierarchyManager;
+import org.apache.jackrabbit.jcr2spi.hierarchy.NodeEntry;
+import org.apache.jackrabbit.jcr2spi.hierarchy.PropertyEntry;
+import org.apache.jackrabbit.spi.NodeId;
+import org.apache.jackrabbit.spi.PropertyId;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import javax.jcr.Item;
 import javax.jcr.Node;
@@ -30,215 +34,285 @@ import javax.jcr.RangeIterator;
 import javax.jcr.RepositoryException;
 import javax.jcr.version.Version;
 import javax.jcr.version.VersionIterator;
-
-import org.apache.jackrabbit.jcr2spi.hierarchy.HierarchyEntry;
-import org.apache.jackrabbit.jcr2spi.hierarchy.HierarchyManager;
-import org.apache.jackrabbit.spi.ItemId;
-import org.apache.jackrabbit.spi.NodeId;
-import org.apache.jackrabbit.spi.PropertyId;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.NoSuchElementException;
 
 /**
- * {@code LazyItemIterator} is an id-based iterator that instantiates
- * the {@code Item}s only when they are requested.
+ * {@code LazyItemIterator} returns id-based iterators which instantiate
+ * {@code Item}s only when they are requested.
  * <p/>
  * <strong>Important:</strong> {@code Item}s that appear to be nonexistent
  * for some reason (e.g. because of insufficient access rights or because they
  * have been removed since the iterator has been retrieved) are silently
  * skipped. As a result the size of the iterator as reported by
- * {@link #getSize()} always returns -1.
+ * {@link RangeIterator#getSize()} always returns -1.
  */
-public class LazyItemIterator implements NodeIterator, PropertyIterator, VersionIterator
{
-
-    /** Logger instance for this class */
+public final class LazyItemIterator {
     private static final Logger log = LoggerFactory.getLogger(LazyItemIterator.class);
 
     private static final long UNDEFINED_SIZE = -1;
 
-    /** the item manager that is used to lazily fetch the items */
-    private final ItemManager itemMgr;
-
-    /** Iterator over HierarchyEntry elements */
-    private final Iterator<? extends HierarchyEntry> hierarchyEntries;
+    private LazyItemIterator() {
+    }
 
     /**
-     * The number of items.
-     * Note, that the size may change over the time due to the lazy behaviour
-     * of this iterator that may only upon iteration found out, that a
-     * hierarchy entry has been invalidated or removed in the mean time.
+     * Creates a new {@code NodeIterator} instance.
+     *
+     * @param itemManager item manager
+     * @param nodeEntries Iterator over NodeEntries
      */
-    private long size;
+    public static NodeIterator nodeIterator(ItemManager itemManager, Iterator<NodeEntry>
nodeEntries) {
+        return new IteratorImpl(itemManager, nodeEntries, sizeOf(nodeEntries));
+    }
 
-    /** the position of the next item */
-    private int pos;
+    /**
+     * Creates a new {@code NodeIterator} instance.
+     *
+     * @param itemManager
+     * @param hierarchyManager
+     * @param nodeIds
+     */
+    public static NodeIterator nodeIterator(ItemManager itemManager, HierarchyManager hierarchyManager,
+            Iterator<NodeId> nodeIds) throws RepositoryException {
 
-    /** pre-fetched item to be returned on {@code }{@link #next()}</code> */
-    private Item next;
+        List<NodeEntry> entries = nodeEntries(hierarchyManager, nodeIds);
+        return new IteratorImpl(itemManager, entries.iterator(), entries.size());
+    }
 
     /**
-     * Creates a new {@code LazyItemIterator} instance.
+     * Creates a new {@code PropertyIterator} instance.
      *
-     * @param itemMgr item manager
-     * @param hierarchyEntryIterator Iterator over HierarchyEntries
+     * @param itemManager item manager
+     * @param propertyEntries Iterator over PropertyEntries
      */
-    public LazyItemIterator(ItemManager itemMgr, Iterator<? extends HierarchyEntry>
hierarchyEntryIterator) {
-        this.itemMgr = itemMgr;
-        hierarchyEntries = hierarchyEntryIterator;
-        if (hierarchyEntryIterator instanceof RangeIterator) {
-            size = ((RangeIterator) hierarchyEntryIterator).getSize();
-        } else {
-            size = UNDEFINED_SIZE;
-        }
-        pos = 0;
-        // fetch first item
-        next = prefetchNext();
+    public static PropertyIterator propertyIterator(ItemManager itemManager, Iterator<PropertyEntry>
propertyEntries) {
+        return new IteratorImpl(itemManager, propertyEntries, sizeOf(propertyEntries));
     }
 
     /**
-     * Creates a new {@code LazyItemIterator} instance.
+     * Creates a new {@code PropertyIterator} instance.
      *
-     * @param itemMgr
-     * @param hierarchyMgr
-     * @param itemIds
+     * @param itemManager
+     * @param hierarchyManager
+     * @param propertyIds
      */
-    public LazyItemIterator(ItemManager itemMgr, HierarchyManager hierarchyMgr, Iterator<?
extends ItemId> itemIds)
-            throws RepositoryException {
+    public static PropertyIterator propertyIterator(ItemManager itemManager, HierarchyManager
hierarchyManager,
+            Iterator<PropertyId> propertyIds) throws RepositoryException {
 
-        this.itemMgr = itemMgr;
-        List<HierarchyEntry> entries = new ArrayList<HierarchyEntry>();
-        while (itemIds.hasNext()) {
-            ItemId id = itemIds.next();
-            HierarchyEntry entry;
-            if (id.denotesNode()) {
-                entry = hierarchyMgr.getNodeEntry((NodeId) id);
-            } else {
-                entry = hierarchyMgr.getPropertyEntry((PropertyId) id);
-            }
-            entries.add(entry);
-        }
-        hierarchyEntries = entries.iterator();
-        size = entries.size();
-        pos = 0;
-        // fetch first item
-        next = prefetchNext();
+        List<PropertyEntry> entries = propertyEntries(hierarchyManager, propertyIds);
+        return new IteratorImpl(itemManager, entries.iterator(), entries.size());
     }
 
     /**
-     * Pre-fetches next item.
-     * <p>
-     * {@link #next} is set to the next available item in this iterator or to
-     * {@code null} in case there are no more items.
+     * Creates a new {@code VersionIterator} instance.
+     *
+     * @param itemManager item manager
+     * @param nodeEntries Iterator over NodeEntries
      */
-    private Item prefetchNext() {
-        Item nextItem = null;
-        while (nextItem == null && hierarchyEntries.hasNext()) {
-            HierarchyEntry entry = hierarchyEntries.next();
-            try {
-                nextItem = itemMgr.getItem(entry);
-            } catch (RepositoryException e) {
-                log.warn("Failed to fetch item " + entry.getName() + ", skipping.", e.getMessage());
-                // reduce the size... and try the next one
-                size--;
-            }
-        }
-        return nextItem;
+    public static VersionIterator versionIterator(ItemManager itemManager, Iterator<NodeEntry>
nodeEntries) {
+        return new IteratorImpl(itemManager, nodeEntries, sizeOf(nodeEntries));
     }
 
-    //-------------------------------------------------------< NodeIterator >---
+    /**
+     * Creates a new {@code VersionIterator} instance.
+     *
+     * @param itemManager
+     * @param hierarchyManager
+     * @param nodeIds
+     */
+    public static VersionIterator versionIterator(ItemManager itemManager, HierarchyManager
hierarchyManager,
+            Iterator<NodeId> nodeIds) throws RepositoryException {
 
-    @Override
-    public Node nextNode() {
-        return (Node) next();
+        List<NodeEntry> entries = nodeEntries(hierarchyManager, nodeIds);
+        return new IteratorImpl(itemManager, entries.iterator(), entries.size());
     }
 
-    //---------------------------------------------------< PropertyIterator >---
-
-    @Override
-    public Property nextProperty() {
-        return (Property) next();
+    //------------------------------------------< private >---
+    
+    private static long sizeOf(Iterator<?> it) {
+        return it instanceof RangeIterator
+                ? ((RangeIterator) it).getSize()
+                : UNDEFINED_SIZE;
     }
 
-    //----------------------------------------------------< VersionIterator >---
+    private static List<NodeEntry> nodeEntries(HierarchyManager hierarchyManager, Iterator<NodeId>
ids)
+            throws RepositoryException {
 
-    @Override
-    public Version nextVersion() {
-        return (Version) next();
+        List<NodeEntry> entries = new ArrayList<NodeEntry>();
+        while (ids.hasNext()) {
+            entries.add(hierarchyManager.getNodeEntry(ids.next()));
+        }
+        return entries;
     }
 
-    //------------------------------------------------------< RangeIterator >---
+    private static List<PropertyEntry> propertyEntries(HierarchyManager hierarchyManager,
Iterator<PropertyId> ids)
+            throws RepositoryException {
 
-    @Override
-    public long getPosition() {
-        return pos;
+        List<PropertyEntry> entries = new ArrayList<PropertyEntry>();
+        while (ids.hasNext()) {
+            entries.add(hierarchyManager.getPropertyEntry(ids.next()));
+        }
+        return entries;
     }
 
-    /**
-     * Returns the number of {@code Item}s in this iterator or -1 if the
-     * size is unknown.
-     * </p>
-     * Note: The number returned by this method may differ from the number
-     * of {@code Item}s actually returned by calls to hasNext() / getNextNode().
-     * This is caused by the lazy instantiation behaviour of this iterator,
-     * that may detect only upon iteration that an Item has been invalidated
-     * or removed in the mean time. As soon as an invalid {@code Item} is
-     * detected, the size of this iterator is adjusted.
-     *
-     * @return the number of {@code Item}s in this iterator.
-     * @see RangeIterator#getSize()
-     */
-    @Override
-    public long getSize() {
-        return size;
-    }
+    //------------------------------------------< Inner class >---
+    
+    private static class IteratorImpl implements NodeIterator, PropertyIterator, VersionIterator
{
+
+        /** the item manager that is used to lazily fetch the items */
+        private final ItemManager itemMgr;
+
+        /** Iterator over HierarchyEntry elements */
+        private final Iterator<? extends HierarchyEntry> hierarchyEntries;
+
+        /**
+         * The number of items.
+         * Note, that the size may change over the time due to the lazy behaviour
+         * of this iterator that may only upon iteration found out, that a
+         * hierarchy entry has been invalidated or removed in the mean time.
+         */
+        private long size;
+
+        /** the position of the next item */
+        private int pos;
+
+        /** pre-fetched item to be returned on {@code }{@link #next()}</code> */
+        private Item next;
+
+        /**
+         * Creates a new {@code LazyItemIterator} instance.
+         *
+         * @param itemMgr item manager
+         * @param hierarchyEntryIterator Iterator over HierarchyEntries
+         */
+        public IteratorImpl(ItemManager itemMgr, Iterator<? extends HierarchyEntry>
hierarchyEntryIterator, long size) {
+            this.itemMgr = itemMgr;
+            hierarchyEntries = hierarchyEntryIterator;
+            this.size = size;
+            pos = 0;
 
-    @Override
-    public void skip(long skipNum) {
-        if (skipNum < 0) {
-            throw new IllegalArgumentException("skipNum must not be negative");
+            // fetch first item
+            next = prefetchNext();
         }
-        if (skipNum == 0) {
-            return;
+
+        /**
+         * Pre-fetches next item.
+         * <p>
+         * {@link #next} is set to the next available item in this iterator or to
+         * {@code null} in case there are no more items.
+         */
+        private Item prefetchNext() {
+            Item nextItem = null;
+            while (nextItem == null && hierarchyEntries.hasNext()) {
+                HierarchyEntry entry = hierarchyEntries.next();
+                try {
+                    nextItem = itemMgr.getItem(entry);
+                } catch (RepositoryException e) {
+                    log.warn("Failed to fetch item " + entry.getName() + ", skipping.", e.getMessage());
+                    // reduce the size... and try the next one
+                    size--;
+                }
+            }
+            return nextItem;
         }
-        if (next == null) {
-            throw new NoSuchElementException();
+
+        //-------------------------------------------------------< NodeIterator >---
+
+        @Override
+        public Node nextNode() {
+            return (Node) next();
         }
 
-        // skip the first (skipNum - 1) items without actually retrieving them
-        while (--skipNum > 0) {
-            pos++;
-            HierarchyEntry entry = hierarchyEntries.next();
-            // check if item exists but don't build Item instance.
-            while (!itemMgr.itemExists(entry)) {
-                log.debug("Ignoring nonexistent item " + entry);
-                entry = hierarchyEntries.next();
+        //---------------------------------------------------< PropertyIterator >---
+
+        @Override
+        public Property nextProperty() {
+            return (Property) next();
+        }
+
+        //----------------------------------------------------< VersionIterator >---
+
+        @Override
+        public Version nextVersion() {
+            return (Version) next();
+        }
+
+        //------------------------------------------------------< RangeIterator >---
+
+        @Override
+        public long getPosition() {
+            return pos;
+        }
+
+        /**
+         * Returns the number of {@code Item}s in this iterator or -1 if the
+         * size is unknown.
+         * </p>
+         * Note: The number returned by this method may differ from the number
+         * of {@code Item}s actually returned by calls to hasNext() / getNextNode().
+         * This is caused by the lazy instantiation behaviour of this iterator,
+         * that may detect only upon iteration that an Item has been invalidated
+         * or removed in the mean time. As soon as an invalid {@code Item} is
+         * detected, the size of this iterator is adjusted.
+         *
+         * @return the number of {@code Item}s in this iterator.
+         * @see RangeIterator#getSize()
+         */
+        @Override
+        public long getSize() {
+            return size;
+        }
+
+        @Override
+        public void skip(long skipNum) {
+            if (skipNum < 0) {
+                throw new IllegalArgumentException("skipNum must not be negative");
+            }
+            if (skipNum == 0) {
+                return;
             }
+            if (next == null) {
+                throw new NoSuchElementException();
+            }
+
+            // skip the first (skipNum - 1) items without actually retrieving them
+            while (--skipNum > 0) {
+                pos++;
+                HierarchyEntry entry = hierarchyEntries.next();
+                // check if item exists but don't build Item instance.
+                while (!itemMgr.itemExists(entry)) {
+                    log.debug("Ignoring nonexistent item " + entry);
+                    entry = hierarchyEntries.next();
+                }
+            }
+            // fetch final item (the one to be returned on next())
+            pos++;
+            next = prefetchNext();
         }
-        // fetch final item (the one to be returned on next())
-        pos++;
-        next = prefetchNext();
-    }
 
-    //-----------------------------------------------------------< Iterator >---
+        //-----------------------------------------------------------< Iterator >---
 
-    @Override
-    public boolean hasNext() {
-        return next != null;
-    }
+        @Override
+        public boolean hasNext() {
+            return next != null;
+        }
 
-    @Override
-    public Object next() {
-        if (next == null) {
-            throw new NoSuchElementException();
+        @Override
+        public Object next() {
+            if (next == null) {
+                throw new NoSuchElementException();
+            }
+            Item item = next;
+            pos++;
+            next = prefetchNext();
+            return item;
         }
-        Item item = next;
-        pos++;
-        next = prefetchNext();
-        return item;
-    }
 
-    @Override
-    public void remove() {
-        throw new UnsupportedOperationException("remove");
+        @Override
+        public void remove() {
+            throw new UnsupportedOperationException("remove");
+        }
     }
 }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java?rev=1167296&r1=1167295&r2=1167296&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java
Fri Sep  9 17:01:37 2011
@@ -1468,16 +1468,17 @@ public class NodeImpl extends ItemImpl i
     }
 
     /**
+     *
      * @param name
      * @param weak
      * @return
      * @throws RepositoryException
      */
-    private LazyItemIterator getReferences(String name, boolean weak) throws RepositoryException
{
+    private PropertyIterator getReferences(String name, boolean weak) throws RepositoryException
{
         checkStatus();
         Name propName = name == null ? null : getQName(name);
         Iterator<PropertyId> itr = getNodeState().getNodeReferences(propName, weak);
-        return new LazyItemIterator(getItemManager(), session.getHierarchyManager(), itr);
+        return LazyItemIterator.propertyIterator(getItemManager(), session.getHierarchyManager(),
itr);
     }
 
     /**

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/SessionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/SessionImpl.java?rev=1167296&r1=1167295&r2=1167296&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/SessionImpl.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/SessionImpl.java
Fri Sep  9 17:01:37 2011
@@ -425,8 +425,7 @@ public class SessionImpl extends Abstrac
      * @see javax.jcr.Session#setNamespacePrefix(String, String)
      */
     @Override
-    public void setNamespacePrefix(String prefix, String uri)
-            throws RepositoryException {
+    public void setNamespacePrefix(String prefix, String uri) throws RepositoryException
{
         super.setNamespacePrefix(prefix, uri);
         // Reset name and path caches
         npResolver = new DefaultNamePathResolver(this, true);

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionHistoryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionHistoryImpl.java?rev=1167296&r1=1167295&r2=1167296&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionHistoryImpl.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionHistoryImpl.java
Fri Sep  9 17:01:37 2011
@@ -103,7 +103,7 @@ public class VersionHistoryImpl extends 
                 versionEntries.add(entry);
             }
         }
-        return new LazyItemIterator(getItemManager(), versionEntries.iterator());
+        return LazyItemIterator.versionIterator(getItemManager(), versionEntries.iterator());
     }
 
     @Override

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SubscriptionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SubscriptionImpl.java?rev=1167296&r1=1167295&r2=1167296&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SubscriptionImpl.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SubscriptionImpl.java
Fri Sep  9 17:01:37 2011
@@ -174,7 +174,7 @@ public class SubscriptionImpl implements
 
         public synchronized String wait(final String baseRevision, final long timeout) throws
RepositoryException {
             if (baseRevision == null) {
-                throw new IllegalArgumentException("Base revision may not be null");
+                throw new IllegalArgumentException("IteratorImpl revision may not be null");
             }
             if (waitForCommit != null) {
                 throw new IllegalStateException("Wait already in progress");



Mime
View raw message