diff options
author | Thomas Nelson Jr (arthurdent3) tn1381@att.com <tn1381@att.com> | 2018-03-18 01:48:08 -0400 |
---|---|---|
committer | Thomas Nelson Jr (arthurdent3) tn1381@att.com <tn1381@att.com> | 2018-03-18 01:48:08 -0400 |
commit | 67da04ebd086a4e79c9f9acf4d1084729306b2d6 (patch) | |
tree | dc2ef489142d6568352bb125d3236de4c70e5ec4 /src/main/java/org/onap/music/main/CachingUtil.java | |
parent | 3c86680e532b959bd637b6c093b3916ae5bcee11 (diff) |
CLM Changes
Change-Id: Id34c036653bf0816e5c67004e4dcf7da90e470e7
Issue-ID: MUSIC-47, MUSIC-48, MUSIC-49
Signed-off-by: Thomas Nelson Jr (arthurdent3) tn1381@att.com <tn1381@att.com>
Diffstat (limited to 'src/main/java/org/onap/music/main/CachingUtil.java')
-rwxr-xr-x | src/main/java/org/onap/music/main/CachingUtil.java | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/main/java/org/onap/music/main/CachingUtil.java b/src/main/java/org/onap/music/main/CachingUtil.java index 16a02862..2c46efbc 100755 --- a/src/main/java/org/onap/music/main/CachingUtil.java +++ b/src/main/java/org/onap/music/main/CachingUtil.java @@ -244,7 +244,7 @@ public class CachingUtil implements Runnable { return resultMap; } if (!musicCache.get(keyspace).toString().equals(aid)) { - resultMap.put("Exception Message", + resultMap.put("Exception", "Unauthorized operation. Invalid AID for the keyspace"); return resultMap; } @@ -267,8 +267,7 @@ public class CachingUtil implements Runnable { appNameCache.put(namespace, isAAF); } - public static Boolean isAAFApplication(String namespace) throws MusicServiceException { - + public static String isAAFApplication(String namespace) throws MusicServiceException { String isAAF = appNameCache.get(namespace); if (isAAF == null) { PreparedQueryObject pQuery = new PreparedQueryObject(); @@ -278,14 +277,14 @@ public class CachingUtil implements Runnable { Row rs = MusicCore.get(pQuery).one(); try { isAAF = String.valueOf(rs.getBool("is_aaf")); - appNameCache.put(namespace, isAAF); + if(isAAF != null) + appNameCache.put(namespace, isAAF); } catch (Exception e) { logger.error(EELFLoggerDelegate.errorLogger, e.getMessage(), AppMessages.QUERYERROR,ErrorSeverity.ERROR, ErrorTypes.QUERYERROR); e.printStackTrace(); } } - - return Boolean.valueOf(isAAF); + return isAAF; } public static String getUuidFromMusicCache(String keyspace) throws MusicServiceException { |