I wonder if it's possible to locally suppress errorprone warnings without getting an Eclipse warning instead. For example, with this line
private final byte[] magicBytes;
in an enum, I get the ImmutableEnumChecker
warning as byte[]
is mutable. This makes sense, but I ensured that it never leaks and never gets mutated, so I'd like to suppress the warning here. I don't want to suppress it globally, so I can't use the command line parameters and with
@SuppressWarnings("ImmutableEnumChecker")
I only trade the errorprone warning for the Eclipse warning Unsupported @SuppressWarnings("ImmutableEnumChecker")
.
Before, I used to use findbugs which has @SuppressFBWarnings
for this very reason....
Is there something like "SuppressFBWarnings" in errorprone? Or any other solution?