Remove unnecessary array creation for varargs parameters

SonarLint reports:

Arrays should not be created for varargs parameters (squid:S3878)

There's no point in creating an array solely for the purpose of
passing it as a varargs (...) argument; varargs is an array. Simply
pass the elements directly. They will be consolidated into an array
automatically.

Change-Id: Ib3b8795a0afa8849292da3c1bffad5c2d6e4ad49
This commit is contained in:
David Pursehouse
2020-02-19 17:45:17 +09:00
parent d77a118150
commit b715bb82a4
3 changed files with 4 additions and 5 deletions

View File

@@ -733,7 +733,7 @@ public abstract class AbstractDaemonTest {
}
private static final List<Character> RANDOM =
Chars.asList(new char[] {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'});
Chars.asList('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h');
protected PushOneCommit.Result amendChange(String changeId) throws Exception {
return amendChange(changeId, "refs/for/master", admin, testRepo);