Don't duplicate commandName in SSH log
Using an enhanced for loop caused it to include arg[0] which duplicated commandName. Now it uses an explicit for loop starting at index 1 to avoid this. Change-Id: Ie1db7d41c1670ba463f8c8002560192183015113
This commit is contained in:
parent
d389733663
commit
c57cc47865
@ -269,8 +269,9 @@ class SshLog implements LifecycleListener {
|
|||||||
|
|
||||||
private String extractWhat(DispatchCommand dcmd) {
|
private String extractWhat(DispatchCommand dcmd) {
|
||||||
String commandName = dcmd.getCommandName();
|
String commandName = dcmd.getCommandName();
|
||||||
for (String arg : dcmd.getArguments()) {
|
String[] args = dcmd.getArguments();
|
||||||
commandName = commandName + "." + arg;
|
for (int i = 1; i < args.length; i++) {
|
||||||
|
commandName = commandName + "." + args[i];
|
||||||
}
|
}
|
||||||
return commandName;
|
return commandName;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user