summaryrefslogtreecommitdiffstats
path: root/auth/auth-gui
diff options
context:
space:
mode:
authorezhil <ezhrajam@in.ibm.com>2018-12-10 18:32:28 +0530
committerezhil <ezhrajam@in.ibm.com>2018-12-10 18:32:44 +0530
commit51aca8cf7470a4465ecc9ee82bd4f507b01c90cf (patch)
tree840d6a4991b4d9052dcb557a3982985301294fa6 /auth/auth-gui
parentd499a5481bf34b6dfed090efb8c6d78822373e77 (diff)
Fixed sonar issue in CUI.java
Fixed loggging issue for exception Issue-ID: AAF-646 Change-Id: If075d2a2a7342ff2243193597c3076624bb28f9c Signed-off-by: ezhil <ezhrajam@in.ibm.com>
Diffstat (limited to 'auth/auth-gui')
-rw-r--r--auth/auth-gui/src/main/java/org/onap/aaf/auth/cui/CUI.java22
1 files changed, 14 insertions, 8 deletions
diff --git a/auth/auth-gui/src/main/java/org/onap/aaf/auth/cui/CUI.java b/auth/auth-gui/src/main/java/org/onap/aaf/auth/cui/CUI.java
index e533abbe..121ee3f7 100644
--- a/auth/auth-gui/src/main/java/org/onap/aaf/auth/cui/CUI.java
+++ b/auth/auth-gui/src/main/java/org/onap/aaf/auth/cui/CUI.java
@@ -4,12 +4,14 @@
* ===========================================================================
* Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
* ===========================================================================
+ * Modifications Copyright (C) 2018 IBM.
+ * ============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -29,6 +31,7 @@ import javax.servlet.http.HttpServletResponse;
import org.onap.aaf.auth.cmd.AAFcli;
import org.onap.aaf.auth.env.AuthzTrans;
+import org.onap.aaf.auth.env.AuthzEnv;
import org.onap.aaf.auth.gui.AAF_GUI;
import org.onap.aaf.auth.rserv.HttpCode;
import org.onap.aaf.cadi.aaf.v2_0.AAFConHttp;
@@ -37,8 +40,11 @@ import org.onap.aaf.cadi.principal.TaggedPrincipal;
import org.onap.aaf.misc.env.Env;
import org.onap.aaf.misc.env.TimeTaken;
+
public class CUI extends HttpCode<AuthzTrans, Void> {
private final AAF_GUI gui;
+
+
public CUI(AAF_GUI gui) {
super(null,"Command Line");
this.gui = gui;
@@ -61,11 +67,11 @@ public class CUI extends HttpCode<AuthzTrans, Void> {
// Access needs to be set after overall construction. Thus, the lazy create.
AAFcli aafcli;
AAFConHttp aafcon = gui.aafCon();
- aafcli= new AAFcli(gui.access,gui.env, pw,
- aafcon.hman(),
- aafcon.securityInfo(),
+ aafcli= new AAFcli(gui.access,gui.env, pw,
+ aafcon.hman(),
+ aafcon.securityInfo(),
new HTransferSS(p,AAF_GUI.app,
- aafcon.securityInfo()));
+ aafcon.securityInfo()));
aafcli.verbose(false);
aafcli.gui(true);
@@ -81,13 +87,13 @@ public class CUI extends HttpCode<AuthzTrans, Void> {
pw.flush();
} catch (Exception e) {
pw.flush();
- pw.println(e.getMessage());
+ trans.error().log("Error", e.getMessage());
} finally {
aafcli.close();
}
} finally {
tt.done();
}
-
+
}
}