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 --- .../src/main/java/org/onap/aaf/auth/cmd/AAFcli.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'auth/auth-cmd/src/main/java') diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/AAFcli.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/AAFcli.java index 1a60f68b..2d5e172d 100644 --- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/AAFcli.java +++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/AAFcli.java @@ -433,8 +433,10 @@ public class AAFcli { try { AAFSSO aafsso = new AAFSSO(args); + String noexit = aafsso.access().getProperty("no_exit"); try { PropAccess access = aafsso.access(); + if(aafsso.ok()) { Define.set(access); AuthzEnv env = new AuthzEnv(access); @@ -589,21 +591,21 @@ public class AAFcli { } finally { aafsso.close(); StringBuilder err = aafsso.err(); - String noexit = aafsso.access().getProperty("no_exit"); if (err != null) { err.append("to continue..."); System.err.println(err); } - if(noexit==null) { - return; - } - } + if(noexit==null) { + return; + } + + } catch (MessageException e) { System.out.println("MessageException caught"); System.err.println(e.getMessage()); - } catch (Throwable e) { + } catch (Exception e) { e.printStackTrace(System.err); } System.exit(rv); -- cgit 1.2.3-korg