jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1084889 - in /jackrabbit/trunk: jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/token/ jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/privilege/ jackrabbit-jcr-server/src/main/java/org/a...
Date Thu, 24 Mar 2011 10:14:15 GMT
Author: angela
Date: Thu Mar 24 10:14:14 2011
New Revision: 1084889

URL: http://svn.apache.org/viewvc?rev=1084889&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/authentication/token/TokenBasedAuthentication.java
    jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/privilege/PrivilegeXmlHandler.java
    jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/WorkspaceResourceImpl.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/token/TokenBasedAuthentication.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/token/TokenBasedAuthentication.java?rev=1084889&r1=1084888&r2=1084889&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/token/TokenBasedAuthentication.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/token/TokenBasedAuthentication.java
Thu Mar 24 10:14:14 2011
@@ -210,9 +210,8 @@ public class TokenBasedAuthentication im
                     tokenNode = getTokenNode();
                     s = tokenNode.getSession();
                 }
-                for (Map.Entry<String, String> entry : newAttributes.entrySet()) {
-                	String attrName = entry.getKey();
-                    tokenNode.setProperty(attrName, entry.getValue());
+                for (String attrName : newAttributes.keySet()) {
+                    tokenNode.setProperty(attrName, newAttributes.get(attrName));
                     log.info("Updating token node with informative attribute '" + attrName
+ "'");
                 }
             }

Modified: jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/privilege/PrivilegeXmlHandler.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/privilege/PrivilegeXmlHandler.java?rev=1084889&r1=1084888&r2=1084889&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/privilege/PrivilegeXmlHandler.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/privilege/PrivilegeXmlHandler.java
Thu Mar 24 10:14:14 2011
@@ -138,8 +138,8 @@ class PrivilegeXmlHandler implements Pri
             Document doc = builder.newDocument();
             Element privileges = (Element) doc.appendChild(doc.createElement(XML_PRIVILEGES));
 
-            for (Map.Entry<String, String> entry : namespaces.entrySet()) {
-                privileges.setAttribute(ATTR_XMLNS + entry.getKey(), entry.getValue());
+            for (String prefix : namespaces.keySet()) {
+                privileges.setAttribute(ATTR_XMLNS + prefix, namespaces.get(prefix));
             }
 
             for (PrivilegeDefinition def : definitions) {

Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/WorkspaceResourceImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/WorkspaceResourceImpl.java?rev=1084889&r1=1084888&r2=1084889&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/WorkspaceResourceImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/WorkspaceResourceImpl.java
Thu Mar 24 10:14:14 2011
@@ -75,6 +75,7 @@ public class WorkspaceResourceImpl exten
      *
      * @param locator
      * @param session
+     * @param factory
      */
     WorkspaceResourceImpl(DavResourceLocator locator, JcrDavSession session, DavResourceFactory
factory) {
         super(locator, session, factory);
@@ -267,8 +268,9 @@ public class WorkspaceResourceImpl exten
 
                 // try to register any prefix/uri pair that has a changed uri or
                 // it has not been present before.
-                for (Map.Entry<String, String> entry : changes.entrySet()) {
-                    nsReg.registerNamespace(entry.getKey(), entry.getValue());
+                for (String prefix : changes.keySet()) {
+                    String uri = changes.get(prefix);
+                    nsReg.registerNamespace(prefix, uri);
                 }
             } catch (RepositoryException e) {
                 throw new JcrDavException(e);



Mime
View raw message