jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1299387 - in /jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state: PersistentNodeState.java TransientNodeState.java
Date Sun, 11 Mar 2012 16:15:48 GMT
Author: mduerig
Date: Sun Mar 11 16:15:48 2012
New Revision: 1299387

URL: http://svn.apache.org/viewvc?rev=1299387&view=rev
Log:
Microkernel based prototype of JCR implementation (WIP)
- use covariant return types from OAK-8 

Modified:
    jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/PersistentNodeState.java
    jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/TransientNodeState.java

Modified: jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/PersistentNodeState.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/PersistentNodeState.java?rev=1299387&r1=1299386&r2=1299387&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/PersistentNodeState.java
(original)
+++ jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/PersistentNodeState.java
Sun Mar 11 16:15:48 2012
@@ -52,9 +52,8 @@ public class PersistentNodeState extends
     }
 
     @Override
-    public Iterable<PropertyState> getProperties() {
-        // fixme: make return type of getProperties covariant
-        return (Iterable<PropertyState>) (Iterable<?>) properties.apply().values();
+    public Iterable<? extends PropertyState> getProperties() {
+        return properties.apply().values();
     }
 
     @Override
@@ -80,7 +79,7 @@ public class PersistentNodeState extends
     }
 
     @Override
-    public Iterable<ChildNodeEntry> getChildNodeEntries(final long offset, final long
length) {
+    public Iterable<? extends ChildNodeEntry> getChildNodeEntries(final long offset,
final long length) {
         // fixme: microkernel should also use long for length
         String json = microkernel.getNodes(path.toMkPath(), revision, 1, offset, (int) length,
null);
         final List<ChildNodeEntry> childNodeEntries = new ArrayList<ChildNodeEntry>();

Modified: jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/TransientNodeState.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/TransientNodeState.java?rev=1299387&r1=1299386&r2=1299387&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/TransientNodeState.java
(original)
+++ jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/TransientNodeState.java
Sun Mar 11 16:15:48 2012
@@ -96,7 +96,7 @@ public class TransientNodeState {
 
     public Iterator<TransientNodeState> getChildNodeStates() {
         // todo implement paging
-        Iterable<ChildNodeEntry> persistedEntries = getPersistentNodeState().getChildNodeEntries(0,
Long.MAX_VALUE);
+        Iterable<? extends ChildNodeEntry> persistedEntries = getPersistentNodeState().getChildNodeEntries(0,
Long.MAX_VALUE);
         final NodeDelta delta = getNodeDelta();
 
         // fixme: this is not safe against concurrent modifications. Either copy delta or
make NodeDelta immutable
@@ -136,7 +136,7 @@ public class TransientNodeState {
     }
 
     public Iterator<PropertyState> getProperties() {
-        Iterable<PropertyState> propertyStates = getPersistentNodeState().getProperties();
+        Iterable<? extends PropertyState> propertyStates = getPersistentNodeState().getProperties();
         final NodeDelta delta = getNodeDelta();
 
         // fixme: this is not safe against concurrent modifications. Either copy delta or
make NodeDelta immutable



Mime
View raw message