Fix but in app exists logic. All tests pass with app ID cache changes.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/9486cdd3 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/9486cdd3 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/9486cdd3 Branch: refs/heads/master Commit: 9486cdd3e0b2aeb3739dce8cb551fb3dad132148 Parents: 177e063 Author: Dave Johnson <snoopd...@apache.org> Authored: Mon Apr 11 08:42:21 2016 -0400 Committer: Dave Johnson <snoopd...@apache.org> Committed: Mon Apr 11 08:42:21 2016 -0400 ---------------------------------------------------------------------- .../apache/usergrid/corepersistence/CpEntityManagerFactory.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/usergrid/blob/9486cdd3/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java ---------------------------------------------------------------------- diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java index a88bf7b..c3bcaf6 100644 --- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java +++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java @@ -221,7 +221,7 @@ public class CpEntityManagerFactory implements EntityManagerFactory, Application final UUID appId = applicationIdCache.getApplicationId( appName ); - if ( appId == null ) { + if ( appId != null ) { throw new ApplicationAlreadyExistsException( name ); } @@ -259,7 +259,7 @@ public class CpEntityManagerFactory implements EntityManagerFactory, Application // check for pre-existing application - if ( lookupApplication( appName ) == null ) { + if ( lookupApplication( appName ) != null ) { throw new ApplicationAlreadyExistsException( appName ); }