jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1170678 - in /jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/flat: BTreeManager.java SizedIterator.java
Date Wed, 14 Sep 2011 15:19:31 GMT
Author: jukka
Date: Wed Sep 14 15:19:30 2011
New Revision: 1170678

URL: http://svn.apache.org/viewvc?rev=1170678&view=rev
Log:
JCR-3062 Move FilterIterator and SizedIterator from package flat to package iterator

Changing the return type of BTreeManager methods is not backwards-compatible. Restore old
return types even at the expense of deprecation warnings.

Modified:
    jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/flat/BTreeManager.java
    jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/flat/SizedIterator.java

Modified: jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/flat/BTreeManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/flat/BTreeManager.java?rev=1170678&r1=1170677&r2=1170678&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/flat/BTreeManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/flat/BTreeManager.java
Wed Sep 14 15:19:30 2011
@@ -18,7 +18,6 @@ package org.apache.jackrabbit.commons.fl
 
 import org.apache.jackrabbit.JcrConstants;
 import org.apache.jackrabbit.commons.iterator.FilterIterator;
-import org.apache.jackrabbit.commons.iterator.SizedIterator;
 import org.apache.jackrabbit.commons.predicate.Predicate;
 
 import javax.jcr.Item;
@@ -166,6 +165,7 @@ public class BTreeManager implements Tre
      * @see org.apache.jackrabbit.commons.flat.TreeManager#split(org.apache.jackrabbit.commons.flat.ItemSequence,
      *      javax.jcr.Node, javax.jcr.Node)
      */
+    @SuppressWarnings("deprecation")
     public void split(ItemSequence itemSequence, Node node, Node cause) throws RepositoryException
{
         SizedIterator<Node> childNodes = getNodes(node);
         int count = (int) childNodes.getSize();
@@ -185,6 +185,7 @@ public class BTreeManager implements Tre
      * @see org.apache.jackrabbit.commons.flat.TreeManager#split(org.apache.jackrabbit.commons.flat.ItemSequence,
      *      javax.jcr.Node, javax.jcr.Property)
      */
+    @SuppressWarnings("deprecation")
     public void split(ItemSequence itemSequence, Node node, Property cause) throws RepositoryException
{
         SizedIterator<Property> properties = getProperties(node);
         int count = (int) properties.getSize();
@@ -204,6 +205,7 @@ public class BTreeManager implements Tre
      * @see org.apache.jackrabbit.commons.flat.TreeManager#join(org.apache.jackrabbit.commons.flat.ItemSequence,
      *      javax.jcr.Node, javax.jcr.Node)
      */
+    @SuppressWarnings("deprecation")
     public void join(ItemSequence itemSequence, Node node, Node cause) throws RepositoryException
{
         SizedIterator<Node> nodes = getNodes(node);
         long count = nodes.getSize();
@@ -225,6 +227,7 @@ public class BTreeManager implements Tre
      * @see org.apache.jackrabbit.commons.flat.TreeManager#join(org.apache.jackrabbit.commons.flat.ItemSequence,
      *      javax.jcr.Node, javax.jcr.Property)
      */
+    @SuppressWarnings("deprecation")
     public void join(ItemSequence itemSequence, Node node, Property cause) throws RepositoryException
{
         SizedIterator<Property> properties = getProperties(node);
         long count = properties.getSize();
@@ -266,7 +269,7 @@ public class BTreeManager implements Tre
     /**
      * Returns a {@link SizedIterator} of the child nodes of <code>node</code>.
      */
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings({ "deprecation", "unchecked" })
     protected SizedIterator<Node> getNodes(Node node) throws RepositoryException {
         NodeIterator nodes = node.getNodes();
         return getSizedIterator(nodes, nodes.getSize());
@@ -276,6 +279,7 @@ public class BTreeManager implements Tre
      * Returns a {@link SizedIterator} of the properties of <code>node</code>
      * which excludes the <code>jcr.primaryType</code> property.
      */
+    @SuppressWarnings({ "deprecation", "unchecked" })
     protected SizedIterator<Property> getProperties(Node node) throws RepositoryException
{
         final PropertyIterator properties = node.getProperties();
 
@@ -319,6 +323,7 @@ public class BTreeManager implements Tre
      * <code>size</code>. The value of the <code>size</code> parameter
must
      * correctly reflect the number of items in <code>iterator</code>.
      */
+    @SuppressWarnings("deprecation")
     protected final <T> SizedIterator<T> getSizedIterator(final Iterator<T>
iterator, final long size) {
         return new SizedIterator<T>() {
             public boolean hasNext() {

Modified: jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/flat/SizedIterator.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/flat/SizedIterator.java?rev=1170678&r1=1170677&r2=1170678&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/flat/SizedIterator.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/flat/SizedIterator.java
Wed Sep 14 15:19:30 2011
@@ -16,8 +16,6 @@
  */
 package org.apache.jackrabbit.commons.flat;
 
-import java.util.Iterator;
-
 /**
  * <code>SizedIterator</code> extends {@link java.util.Iterator} with a
  * <code>getSize</code> method.



Mime
View raw message