summaryrefslogtreecommitdiffstats
path: root/cadi
diff options
context:
space:
mode:
authorInstrumental <jonathan.gathman@att.com>2018-07-03 13:21:03 -0500
committerInstrumental <jonathan.gathman@att.com>2018-07-03 13:21:09 -0500
commit01c17dafca7527ebd8d43d22babea6e2136fc706 (patch)
treef61d256677863185889aa58af0ac2e6219508127 /cadi
parentf85f0889b3b0e5e9694afab4dd01a4a97a155188 (diff)
Remove Sonar Blockers
Issue-ID: AAF-386 Change-Id: Ic9f1f17b949fd1192a35bce5eb10481fda0e06ee Signed-off-by: Instrumental <jonathan.gathman@att.com>
Diffstat (limited to 'cadi')
-rw-r--r--cadi/aaf/src/main/java/org/onap/aaf/cadi/configure/Agent.java6
-rw-r--r--cadi/core/src/main/java/org/onap/aaf/cadi/config/UsersDump.java2
2 files changed, 5 insertions, 3 deletions
diff --git a/cadi/aaf/src/main/java/org/onap/aaf/cadi/configure/Agent.java b/cadi/aaf/src/main/java/org/onap/aaf/cadi/configure/Agent.java
index b19be6cd..18f6e7ba 100644
--- a/cadi/aaf/src/main/java/org/onap/aaf/cadi/configure/Agent.java
+++ b/cadi/aaf/src/main/java/org/onap/aaf/cadi/configure/Agent.java
@@ -105,7 +105,7 @@ public class Agent {
int exitCode = 0;
doExit = true;
try {
- AAFSSO aafsso;
+ AAFSSO aafsso=null;
PropAccess access;
if(args.length>0 && args[0].equals("validate")) {
@@ -146,7 +146,9 @@ public class Agent {
}
if(cmds.size()==0) {
- aafsso.setLogDefault();
+ if(aafsso!=null) {
+ aafsso.setLogDefault();
+ }
// NOTE: CHANGE IN CMDS should be reflected in AAFSSO constructor, to get FQI->aaf-id or not
System.out.println("Usage: java -jar <cadi-aaf-*-full.jar> cmd [<tag=value>]*");
System.out.println(" create <FQI> [<machine>]");
diff --git a/cadi/core/src/main/java/org/onap/aaf/cadi/config/UsersDump.java b/cadi/core/src/main/java/org/onap/aaf/cadi/config/UsersDump.java
index 974e5810..5aea719e 100644
--- a/cadi/core/src/main/java/org/onap/aaf/cadi/config/UsersDump.java
+++ b/cadi/core/src/main/java/org/onap/aaf/cadi/config/UsersDump.java
@@ -85,7 +85,7 @@ public class UsersDump {
ps.println("</tomcat-users>");
ps.flush();
- } catch (Throwable t) {
+ } catch (Exception t) {
t.printStackTrace(ps);
return false;
}