sdk: Cleanup usage of List.toArray(T[] a)

* The parameter here only has to have the type you want it to return,
  so creating an array of size > 0 is unnecessary and wasteful

Change-Id: I28e490fb6fa3703d7edca21b29d640105072947b
This commit is contained in:
Paul Keith
2019-02-17 05:20:04 +01:00
parent d6a273df74
commit c9f1d6744f
10 changed files with 13 additions and 15 deletions

View File

@@ -59,7 +59,7 @@ public class InsertCommand extends Command {
commandList.add("--bind name:" + setting.getKeyType() + ":" + setting.getKey());
commandList.add("--bind value:" + setting.getValueType() + ":"
+ "\"" + setting.getValue() + "\"");
commands = commandList.toArray(new String[commandList.size()]);
commands = commandList.toArray(new String[0]);
if (MigrationTest.DEBUG) {
System.out.println("Using commands: " + Arrays.toString(commands));
}