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/05/18 11:42:31 UTC
svn commit: r1831854 -
/jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/flat/BTreeManager.java
Author: reschke
Date: Fri May 18 11:42:31 2018
New Revision: 1831854
URL: http://svn.apache.org/viewvc?rev=1831854&view=rev
Log:
JCR-4302: BTreeManager: fix Eclipse compiler error
Modified:
jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/flat/BTreeManager.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=1831854&r1=1831853&r2=1831854&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 Fri May 18 11:42:31 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;