jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1535418 - in /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/permission: AbstractEntryIterator.java CompiledPermissionImpl.java
Date Thu, 24 Oct 2013 15:36:19 GMT
Author: angela
Date: Thu Oct 24 15:36:18 2013
New Revision: 1535418

URL: http://svn.apache.org/r1535418
Log:
OAK-527: permissions (wip)

- minor improvement

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/permission/AbstractEntryIterator.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/permission/CompiledPermissionImpl.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/permission/AbstractEntryIterator.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/permission/AbstractEntryIterator.java?rev=1535418&r1=1535417&r2=1535418&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/permission/AbstractEntryIterator.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/permission/AbstractEntryIterator.java
Thu Oct 24 15:36:18 2013
@@ -23,7 +23,7 @@ import javax.annotation.CheckForNull;
 import com.google.common.collect.Iterators;
 
 /**
- * EntryIterator... TODO
+ * Base class for PermissionEntry iterators.
  */
 abstract class AbstractEntryIterator implements Iterator<PermissionEntry> {
 
@@ -35,12 +35,10 @@ abstract class AbstractEntryIterator imp
 
     @Override
     public boolean hasNext() {
-        if (next == null) {
+        if (next == null && nextEntries == null) {
             // lazy initialization
-            if (nextEntries == null) {
-                nextEntries = Iterators.emptyIterator();
-                seekNext();
-            }
+            nextEntries = Iterators.emptyIterator();
+            seekNext();
         }
         return next != null;
     }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/permission/CompiledPermissionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/permission/CompiledPermissionImpl.java?rev=1535418&r1=1535417&r2=1535418&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/permission/CompiledPermissionImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/permission/CompiledPermissionImpl.java
Thu Oct 24 15:36:18 2013
@@ -62,7 +62,7 @@ import static com.google.common.collect.
  * TODO: WIP
  * FIXME: decide on where to filter out hidden items (OAK-753)
  */
-class CompiledPermissionImpl implements CompiledPermissions, PermissionConstants {
+final class CompiledPermissionImpl implements CompiledPermissions, PermissionConstants {
 
     private static final Logger log = LoggerFactory.getLogger(CompiledPermissionImpl.class);
 



Mime
View raw message