X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=auth%2Fauth-cmd%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Faaf%2Fauth%2Fcmd%2FAAFcli.java;h=51986b923943bdd75c54bb771b13595ea1b4add3;hb=ce222252394650096c5513bdbeb9e0e22ad80ac5;hp=6ca37c3381b890275e5d11fcbc5859a632250ec9;hpb=49a8ce0053b7a4c9655e87020b7eed83ae8c312f;p=aaf%2Fauthz.git 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 6ca37c33..51986b92 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 @@ -4,7 +4,7 @@ * =========================================================================== * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. * - * Modifications Copyright (C) 2018 IBM. + * Modifications Copyright (C) 2019 IBM. * =========================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -90,7 +90,7 @@ public class AAFcli { private static int globalDelay=0; // Create when only have Access - public AAFcli(Access access, Writer wtr, HMangr hman, SecurityInfoC si, SecuritySetter ss) throws APIException, CadiException { + public AAFcli(Access access, Writer wtr, HMangr hman, SecurityInfoC si, SecuritySetter ss) throws APIException { this(access,new AuthzEnv(access.getProperties()),wtr,hman, si,ss); } @@ -215,8 +215,7 @@ public class AAFcli { } } else if ("expect".equalsIgnoreCase(largs[idx])) { expect.clear(); - if (largs.length > idx++) { - if (!"nothing".equals(largs[idx])) { + if ((largs.length > idx++)&&(!"nothing".equals(largs[idx]))) { for (String str : largs[idx].split(",")) { try { if ("Exception".equalsIgnoreCase(str)) { @@ -229,8 +228,7 @@ public class AAFcli { } } ++idx; - } - } + } continue; // Sleep, typically for reports, to allow DB to update // Milliseconds @@ -376,7 +374,8 @@ public class AAFcli { char last = 0; for (int i = 0; i < line.length(); ++i) { char ch; - if (Character.isWhitespace(ch = line.charAt(i))) { + ch = line.charAt(i); + if (Character.isWhitespace(ch)) { if (start || last==',') { continue; // trim } else if (quote != 0) {