jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1084912 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/AccessControlEntryImpl.java
Date Thu, 24 Mar 2011 11:44:26 GMT
Author: angela
Date: Thu Mar 24 11:44:26 2011
New Revision: 1084912

URL: http://svn.apache.org/viewvc?rev=1084912&view=rev
Log:
JCR-2929 - Various places do map lookups in loop instead of using entrySet iterator (reverting
changes made by dave brosius)

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/AccessControlEntryImpl.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/AccessControlEntryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/AccessControlEntryImpl.java?rev=1084912&r1=1084911&r2=1084912&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/AccessControlEntryImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/AccessControlEntryImpl.java
Thu Mar 24 11:44:26 2011
@@ -127,9 +127,9 @@ public abstract class AccessControlEntry
         } else {
             this.restrictions = new HashMap<Name, Value>(restrictions.size());
             // validate the passed restrictions and fill the map
-            for (Map.Entry<String, Value> entry : restrictions.entrySet()) {
-                Value value = ValueHelper.copy(entry.getValue(), getValueFactory());
-                this.restrictions.put(getResolver().getQName(entry.getKey()), value);
+            for (String name : restrictions.keySet()) {
+                Value value = ValueHelper.copy(restrictions.get(name), getValueFactory());
+                this.restrictions.put(getResolver().getQName(name), value);
             }
         }
     }
@@ -148,8 +148,7 @@ public abstract class AccessControlEntry
         if (!base.restrictions.isEmpty()) {
             // validate the passed restrictions and fill the map
             for (Name name : base.restrictions.keySet()) {
-                Value value = base.restrictions.get(name);
-                value = ValueHelper.copy(value, getValueFactory());
+                Value value = ValueHelper.copy(base.restrictions.get(name), getValueFactory());
                 this.restrictions.put(name, value);
             }
         }



Mime
View raw message