Merge "sonar fix AAFcli.java"
[aaf/authz.git] / auth / auth-cmd / src / main / java / org / onap / aaf / auth / cmd / AAFcli.java
index edbe206..2fbfa37 100644 (file)
@@ -123,7 +123,11 @@ public class AAFcli {
         cmds.add(new Mgmt(this));
     }
 
-    public static int timeout() {
+    public AuthzEnv env() {
+               return env;
+       }
+
+       public static int timeout() {
         return TIMEOUT;
     }
 
@@ -328,7 +332,7 @@ public class AAFcli {
                             Thread.sleep((long)(delay+globalDelay));
                         }
                     } catch (Exception e) {
-                        if (expect.contains(-1)) {
+                       if (expect.contains(-1)) {
                             pw.println(e.getMessage());
                             ret = -1;
                         } else {
@@ -538,7 +542,7 @@ public class AAFcli {
                 
                                     String line;
                                     while ((line = reader.readLine()) != null) {
-                                        showDetails = (line.contains("-d"))?true:false;
+                                        showDetails = (line.contains("-d"));
                 
                                         if (line.equalsIgnoreCase("quit") || line.equalsIgnoreCase("q") || line.equalsIgnoreCase("exit")) {
                                             break;