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
This commit is contained in:
Dave Borowitz
2019-05-24 10:37:36 -07:00
committed by David Pursehouse
parent f66892abb5
commit 0b9e581c36
22 changed files with 55 additions and 9 deletions

6
lib/errorprone/BUILD Normal file
View File

@@ -0,0 +1,6 @@
java_library(
name = "annotations",
data = ["//lib:LICENSE-Apache2.0"],
visibility = ["//visibility:public"],
exports = ["@error-prone-annotations//jar"],
)