OptionUtil: Use ImmutableList<String> instead of String[]

Change Id7911fb6d reduced the severity of ImmutableAnnotationChecker
to WARN because it was failing the build with errors like:

  error: [ImmutableAnnotationChecker] annotations should be immutable:
  'AutoAnnotation_OptionUtil_newOption' has field 'aliases' of type
  'java.lang.String[]', arrays are mutable

Fix this by using ImmutableList<String> instead of String[], and
change the severity of the check back to ERROR.

Change-Id: I72d6044a4d5422bf4e28c051b9a39168769a4d57
This commit is contained in:
David Pursehouse
2019-08-30 11:33:48 +09:00
parent e3eccbd6d8
commit 9ab0d639b0
4 changed files with 18 additions and 13 deletions

View File

@@ -53,7 +53,7 @@ java_package_configuration(
"-Xep:FunctionalInterfaceClash:ERROR",
"-Xep:FutureReturnValueIgnored:ERROR",
"-Xep:GetClassOnEnum:ERROR",
"-Xep:ImmutableAnnotationChecker:WARN",
"-Xep:ImmutableAnnotationChecker:ERROR",
"-Xep:ImmutableEnumChecker:ERROR",
"-Xep:IncompatibleModifiers:ERROR",
"-Xep:InjectOnConstructorOfAbstractClass:ERROR",