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:

committed by
David Pursehouse

parent
f66892abb5
commit
0b9e581c36
@@ -35,7 +35,9 @@ public enum ArchiveFormat {
|
||||
TXZ("application/x-xz", new TxzFormat()),
|
||||
ZIP("application/x-zip", new ZipFormat());
|
||||
|
||||
@SuppressWarnings("ImmutableEnumChecker") // ArchiveCommand.Format is effectively immutable.
|
||||
private final ArchiveCommand.Format<?> format;
|
||||
|
||||
private final String mimeType;
|
||||
|
||||
ArchiveFormat(String mimeType, ArchiveCommand.Format<?> format) {
|
||||
|
Reference in New Issue
Block a user