File tree Expand file tree Collapse file tree
modules/apim-cli/src/main/java/com/axway/apim/cli Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -143,15 +143,18 @@ private String getMethodName(Method m) {
143143 }
144144
145145 public static String maskArgs (String [] args ) {
146- String [] masked = args .clone ();
147- for (int i = 0 ; i < masked .length ; i ++) {
148- if (masked [i ].equalsIgnoreCase ("--password" ) || masked [i ].equalsIgnoreCase ("-p" )) {
149- if (i + 1 < masked .length ) {
150- masked [i + 1 ] = "****" ;
146+ if (args !=null ) {
147+ String [] masked = args .clone ();
148+ for (int i = 0 ; i < masked .length ; i ++) {
149+ if (masked [i ].equalsIgnoreCase ("--password" ) || masked [i ].equalsIgnoreCase ("-p" )) {
150+ if (i + 1 < masked .length ) {
151+ masked [i + 1 ] = "****" ;
152+ }
151153 }
152154 }
155+ return Arrays .toString (masked );
153156 }
154- return Arrays . toString ( masked ) ;
157+ return "" ;
155158 }
156159
157160}
You can’t perform that action at this time.
0 commit comments