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:
Ben Beetle 2014-12-05 17:29:13 -05:00
parent d389733663
commit c57cc47865

View File

@ -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;
} }