aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/org/onap/aai/auth/AAIMicroServiceAuthCore.java
diff options
context:
space:
mode:
authormark.j.leonard <mark.j.leonard@gmail.com>2018-09-11 18:17:56 +0100
committermark.j.leonard <mark.j.leonard@gmail.com>2018-09-11 18:35:32 +0100
commit302b153c43ba08d1fe7f5a428cbc7be4299377f4 (patch)
tree03df1ba36fe49c26f3049106439db00702aaae91 /src/main/java/org/onap/aai/auth/AAIMicroServiceAuthCore.java
parente4cc64bb1b7c0acba0fe11160469c03b94bd5be2 (diff)
Improved logging for VNF image extraction
Changes to logging messages to help with debugging issues. Improved Javadoc comments. Issue-ID: AAI-1242 Change-Id: I255eeb774b791a9653fdd0274367801245be6bbd Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
Diffstat (limited to 'src/main/java/org/onap/aai/auth/AAIMicroServiceAuthCore.java')
-rw-r--r--src/main/java/org/onap/aai/auth/AAIMicroServiceAuthCore.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/main/java/org/onap/aai/auth/AAIMicroServiceAuthCore.java b/src/main/java/org/onap/aai/auth/AAIMicroServiceAuthCore.java
index 4ba9b6c..ee5fb26 100644
--- a/src/main/java/org/onap/aai/auth/AAIMicroServiceAuthCore.java
+++ b/src/main/java/org/onap/aai/auth/AAIMicroServiceAuthCore.java
@@ -43,11 +43,12 @@ public class AAIMicroServiceAuthCore {
private static LogHelper applicationLogger = LogHelper.INSTANCE;
- public static final String CONFIG_HOME = "CONFIG_HOME";
+ private static final String CONFIG_HOME = System.getProperty("CONFIG_HOME");
+
public static final String FILESEP =
(System.getProperty("file.separator") == null) ? "/" : System.getProperty("file.separator");
- public static final String APPCONFIG_DIR = (System.getProperty(CONFIG_HOME) == null)
- ? System.getProperty("APP_HOME") + FILESEP + "appconfig" : System.getProperty(CONFIG_HOME);
+ public static final String APPCONFIG_DIR =
+ (CONFIG_HOME == null) ? System.getProperty("APP_HOME") + FILESEP + "appconfig" : CONFIG_HOME;
private static String appConfigAuthDir = APPCONFIG_DIR + FILESEP + "auth";
private static String defaultAuthFileName = appConfigAuthDir + FILESEP + "auth_policy.json";
@@ -86,7 +87,7 @@ public class AAIMicroServiceAuthCore {
throw new AAIAuthException(e.getMessage());
}
if (policyAuthFileName == null) {
- throw new AAIAuthException("Auth policy file could not be found" + System.getProperty(CONFIG_HOME) + APPCONFIG_DIR);
+ throw new AAIAuthException("Auth policy file could not be found" + CONFIG_HOME + APPCONFIG_DIR);
}
AAIMicroServiceAuthCore.reloadUsers();
@@ -252,7 +253,7 @@ public class AAIMicroServiceAuthCore {
}
public boolean hasAllowedFunction(String afunc) {
- return this.allowedFunctions.contains(afunc) ? true : false;
+ return this.allowedFunctions.contains(afunc);
}
}