You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by re...@apache.org on 2018/07/13 11:30:52 UTC

svn commit: r1835818 - in /jackrabbit/branches/2.16: ./ jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/flat/BTreeManager.java

Author: reschke
Date: Fri Jul 13 11:30:52 2018
New Revision: 1835818

URL: http://svn.apache.org/viewvc?rev=1835818&view=rev
Log:
JCR-4302: BTreeManager: fix Eclipse compiler error (ported to 2.16)

Modified:
    jackrabbit/branches/2.16/   (props changed)
    jackrabbit/branches/2.16/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/flat/BTreeManager.java

Propchange: jackrabbit/branches/2.16/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jul 13 11:30:52 2018
@@ -1,3 +1,3 @@
 /jackrabbit/branches/JCR-2272:1173165-1176545
 /jackrabbit/sandbox/JCR-2415-lucene-3.0:1060860-1064038
-/jackrabbit/trunk:1816227,1817094,1817097-1817098,1817100,1817113,1817201,1817213,1817341,1817373,1817377,1818586,1819269,1819271,1819839,1819849,1820119,1820133,1820294,1820573,1820675,1821247,1821475,1821597,1821705,1821880,1822643,1822863,1822947,1822950,1824756,1824763-1824764,1824771,1824876,1826154,1826178,1826230,1826647,1826940,1826964,1828213,1830107,1830201,1830540,1830753,1830814,1830878,1830951,1831182,1833374,1834008
+/jackrabbit/trunk:1816227,1817094,1817097-1817098,1817100,1817113,1817201,1817213,1817341,1817373,1817377,1818586,1819269,1819271,1819839,1819849,1820119,1820133,1820294,1820573,1820675,1821247,1821475,1821597,1821705,1821880,1822643,1822863,1822947,1822950,1824756,1824763-1824764,1824771,1824876,1826154,1826178,1826230,1826647,1826940,1826964,1828213,1830107,1830201,1830540,1830753,1830814,1830878,1830951,1831182,1831854,1833374,1834008

Modified: jackrabbit/branches/2.16/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/flat/BTreeManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.16/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/flat/BTreeManager.java?rev=1835818&r1=1835817&r2=1835818&view=diff
==============================================================================
--- jackrabbit/branches/2.16/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/flat/BTreeManager.java (original)
+++ jackrabbit/branches/2.16/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/flat/BTreeManager.java Fri Jul 13 11:30:52 2018
@@ -265,17 +265,17 @@ public class BTreeManager implements Tre
     /**
      * Returns a {@link SizedIterator} of the child nodes of <code>node</code>.
      */
-    @SuppressWarnings({ "deprecation", "unchecked" })
+    @SuppressWarnings("deprecation")
     protected SizedIterator<Node> getNodes(Node node) throws RepositoryException {
         NodeIterator nodes = node.getNodes();
-        return getSizedIterator(nodes, nodes.getSize());
+        return getSizedIterator(convert(nodes), nodes.getSize());
     }
 
     /**
      * Returns a {@link SizedIterator} of the properties of <code>node</code>
      * which excludes the <code>jcr.primaryType</code> property.
      */
-    @SuppressWarnings({ "deprecation", "unchecked" })
+    @SuppressWarnings("deprecation")
     protected SizedIterator<Property> getProperties(Node node) throws RepositoryException {
         final PropertyIterator properties = node.getProperties();
 
@@ -286,7 +286,7 @@ public class BTreeManager implements Tre
             }
         }
 
-        return getSizedIterator(filterProperties(properties), size);
+        return getSizedIterator(filterProperties(convert(properties)), size);
     }
 
     /**
@@ -342,6 +342,16 @@ public class BTreeManager implements Tre
 
     // -----------------------------------------------------< internal >---
 
+    @SuppressWarnings("unchecked")
+    private static Iterator<Property> convert(PropertyIterator it) {
+        return it;
+    }
+
+    @SuppressWarnings("unchecked")
+    private static Iterator<Node> convert(NodeIterator it) {
+        return it;
+    }
+
     private <T extends Item> void split(Node node, Rank<T> ranking, ItemSequence itemSequence) throws RepositoryException {
         if (ranking.size() <= maxChildren) {
             return;