From 01c17dafca7527ebd8d43d22babea6e2136fc706 Mon Sep 17 00:00:00 2001 From: Instrumental Date: Tue, 3 Jul 2018 13:21:03 -0500 Subject: Remove Sonar Blockers Issue-ID: AAF-386 Change-Id: Ic9f1f17b949fd1192a35bce5eb10481fda0e06ee Signed-off-by: Instrumental --- cadi/aaf/src/main/java/org/onap/aaf/cadi/configure/Agent.java | 6 ++++-- cadi/core/src/main/java/org/onap/aaf/cadi/config/UsersDump.java | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'cadi') 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 cmd []*"); System.out.println(" create []"); 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(""); ps.flush(); - } catch (Throwable t) { + } catch (Exception t) { t.printStackTrace(ps); return false; } -- cgit 1.2.3-korg