Error Prone: Enable and fix ImmutableEnumChecker
* Mark some enums using @Immutable from Error Prone (and also import
that library).
* Suppress one usage of an effectively-immutable JGit class which we
don't control.
* Fixing ReviewerStateInternal to store a String internally rather than
a FooterKey. FooterKey is actually not immutable: it has a package-
private byte array field. Keep returning FooterKey from the interface
for type safety; given that one method was already constructing a new
FooterKey dynamically on every invocation, and that this class is
primarily used for constructing ChangeUpdates, this shouldn't be a
performance issue.
Change-Id: Ieb7ee10e9be39184cff7e0d1d18ff6b433016b31
diff --git a/tools/BUILD b/tools/BUILD
index 8d34156..27af453 100644
--- a/tools/BUILD
+++ b/tools/BUILD
@@ -62,7 +62,7 @@
"-Xep:FutureReturnValueIgnored:ERROR",
"-Xep:GetClassOnEnum:ERROR",
"-Xep:ImmutableAnnotationChecker:ERROR",
- #"-Xep:ImmutableEnumChecker:ERROR",
+ "-Xep:ImmutableEnumChecker:ERROR",
"-Xep:IncompatibleModifiers:ERROR",
"-Xep:InjectOnConstructorOfAbstractClass:ERROR",
"-Xep:InputStreamSlowMultibyteRead:ERROR",