diff options
author | Paul Keith <javelinanddart@gmail.com> | 2019-02-17 05:20:04 +0100 |
---|---|---|
committer | Paul Keith <javelinanddart@gmail.com> | 2019-02-17 23:31:00 +0100 |
commit | c9f1d6744fa58796382d369579f891107d59bd67 (patch) | |
tree | c87df116c70aa8a34b2a61f52a88b1c1edb9ebe0 /host/migration/src/AdbCommand.java | |
parent | d6a273df7424921c3c777ab7dc6b364f5001b805 (diff) | |
download | lineage-sdk-c9f1d6744fa58796382d369579f891107d59bd67.tar.gz lineage-sdk-c9f1d6744fa58796382d369579f891107d59bd67.tar.bz2 lineage-sdk-c9f1d6744fa58796382d369579f891107d59bd67.zip |
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
Diffstat (limited to 'host/migration/src/AdbCommand.java')
-rw-r--r-- | host/migration/src/AdbCommand.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/host/migration/src/AdbCommand.java b/host/migration/src/AdbCommand.java index 54cdb7b7..bdc54640 100644 --- a/host/migration/src/AdbCommand.java +++ b/host/migration/src/AdbCommand.java @@ -54,7 +54,7 @@ public class AdbCommand extends Command { List<String> commandList = new ArrayList<String>( baseCommand.length + 1); commandList.addAll(Arrays.asList(baseCommand)); - String[] commands = commandList.toArray(new String[commandList.size()]); + String[] commands = commandList.toArray(new String[0]); if (MigrationTest.DEBUG) { System.out.println("Using commands: " + Arrays.toString(commands)); |