You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by gr...@apache.org on 2015/11/02 18:54:46 UTC
usergrid git commit: Finished refactor and verified locally.
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 <gr...@apache.org>
Authored: Mon Nov 2 09:54:43 2015 -0800
Committer: George Reyes <gr...@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");
}
}
}