Github user GERey commented on a diff in the pull request: https://github.com/apache/incubator-usergrid/pull/270#discussion_r32138903 --- Diff: stack/services/src/main/java/org/apache/usergrid/security/shiro/utils/SubjectUtils.java --- @@ -243,14 +243,18 @@ public static ApplicationInfo getApplication( Identifier identifier ) { String applicationName = null; UUID applicationId = null; BiMap<UUID, String> applications = getApplications(); + Set<String> values= applications.values(); + if ( applications == null ) { return null; } if ( identifier.isName() ) { applicationName = identifier.getName().toLowerCase(); - applicationId = applications.inverse().get( applicationName ); - if ( applicationId == null ) { - applicationId = applications.inverse().get( identifier.getName() ); + for (String value: values ){ --- End diff -- The reason I normalize the string is just defensive, the real reason I need to normalize the string is because the value that gets created in the Bimap from getApplications is mixed case and it get instantiated through a Session object. Thats why I take this approach.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---