jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1043085 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/UserImporter.java
Date Tue, 07 Dec 2010 15:10:10 GMT
Author: angela
Date: Tue Dec  7 15:10:10 2010
New Revision: 1043085

URL: http://svn.apache.org/viewvc?rev=1043085&view=rev
Log:
minor improvement

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/UserImporter.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/UserImporter.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/UserImporter.java?rev=1043085&r1=1043084&r2=1043085&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/UserImporter.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/UserImporter.java
Tue Dec  7 15:10:10 2010
@@ -122,16 +122,15 @@ public class UserImporter implements Pro
 
     private static final Logger log = LoggerFactory.getLogger(UserImporter.class);
 
+    /**
+     * Parameter name for the import behavior configuration option.
+     */
     public static final String PARAM_IMPORT_BEHAVIOR = "importBehavior";
 
     private JackrabbitSession session;
 
     private NamePathResolver resolver;
 
-    private boolean isWorkspaceImport;
-
-    private int uuidBehavior;
-
     private ReferenceChangeTracker referenceTracker;
 
     private UserPerWorkspaceUserManager userManager;
@@ -148,8 +147,6 @@ public class UserImporter implements Pro
 
         this.session = session;
         this.resolver = resolver;
-        this.isWorkspaceImport = isWorkspaceImport;
-        this.uuidBehavior = uuidBehavior;
         this.referenceTracker = referenceTracker;
 
         if (initialized) {
@@ -299,10 +296,9 @@ public class UserImporter implements Pro
                 // since group-members are references to user/groups that potentially
                 // are to be imported later on -> postpone processing to the end.
                 // see -> processRefeferences
-                Value[] vs = protectedPropInfo.getValues(PropertyType.WEAKREFERENCE, resolver);
                 Membership membership = new Membership(a.getID());
-                for (int i = 0; i < vs.length; i++) {
-                    membership.addMember(new NodeId(vs[i].getString()));
+                for (Value v : protectedPropInfo.getValues(PropertyType.WEAKREFERENCE, resolver))
{
+                    membership.addMember(new NodeId(v.getString()));
                 }
                 referenceTracker.processedReference(membership);
                 return true;
@@ -551,10 +547,9 @@ public class UserImporter implements Pro
 
         if (UserConstants.NT_REP_MEMBERS.equals(childInfo.getNodeTypeName())) {
             for (PropInfo prop : propInfos) {
-                Value[] vs = prop.getValues(PropertyType.WEAKREFERENCE, resolver);
-                for (int i = 0; i < vs.length; i++) {
+                for (Value v : prop.getValues(PropertyType.WEAKREFERENCE, resolver)) {
                     String name = resolver.getJCRName(prop.getName());
-                    NodeId id = new NodeId(vs[i].getString());
+                    NodeId id = new NodeId(v.getString());
                     currentMembership.addMember(name, id);
                 }
             }



Mime
View raw message