usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject usergrid git commit: Finished refactor and verified locally.
Date Mon, 02 Nov 2015 17:54:46 GMT
Repository: usergrid
Updated Branches:
  refs/heads/userCollectionFix 0b3eea179 -> a4205230c


Finished refactor and verified locally.


Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/a4205230
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/a4205230
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/a4205230

Branch: refs/heads/userCollectionFix
Commit: a4205230cc342398e184fa87470bda93ee7fe996
Parents: 0b3eea1
Author: George Reyes <grey@apache.org>
Authored: Mon Nov 2 09:54:43 2015 -0800
Committer: George Reyes <grey@apache.org>
Committed: Mon Nov 2 09:54:43 2015 -0800

----------------------------------------------------------------------
 .../java/org/apache/usergrid/tools/CollectionUserFix.java | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/a4205230/stack/tools/src/main/java/org/apache/usergrid/tools/CollectionUserFix.java
----------------------------------------------------------------------
diff --git a/stack/tools/src/main/java/org/apache/usergrid/tools/CollectionUserFix.java b/stack/tools/src/main/java/org/apache/usergrid/tools/CollectionUserFix.java
index 9b95c7a..143685c 100644
--- a/stack/tools/src/main/java/org/apache/usergrid/tools/CollectionUserFix.java
+++ b/stack/tools/src/main/java/org/apache/usergrid/tools/CollectionUserFix.java
@@ -154,12 +154,7 @@ public class CollectionUserFix extends ExportingToolBase {
 
         for ( Application application : app ) {
 
-            if(entityManager == null || !em.getApplication().equals( application )){
-                em = emf.getEntityManager( application.getUuid() );
-            }
-            else {
-                em = entityManager;
-            }
+            em = emf.getEntityManager( application.getUuid() );
 
             PagingResultsIterator pagingResultsIterator =
                     new PagingResultsIterator( em.searchCollection( application, "users",
query ) );
@@ -168,10 +163,9 @@ public class CollectionUserFix extends ExportingToolBase {
                 Entity entity = ( Entity ) pagingResultsIterator.next();
                 String username =  entity.getProperty( "username" ).toString().toLowerCase();
                 em.getUserByIdentifier( identifier.fromName( username ) );
-
             }
 
-            System.out.println("Repair Complete");
+            System.out.println("Repair of application: "+ application.getApplicationName()
+ " complete");
         }
     }
 }


Mime
View raw message