Skip to content

Commit dd5d22d

Browse files
author
rathnapandi
committed
- fix junit tests
1 parent 58007a3 commit dd5d22d

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

modules/apim-cli/src/main/java/com/axway/apim/cli/APIManagerCLI.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)