Closed ZacSweers closed 7 years ago
The check does consider Class<T>
to be immutable:
enum E {
;
final Class<?> clazz = E.class;
}
do you have a repro?
Ahh interesting, I've found it. This is the repro case
enum E {
;
final Class clazz = E.class;
}
Remove the wildcard
I have a final
Class
instance field in an enum, and found that error-prone does not consider it Immutable. I can't quite wrap my head around as to why though, as I don't see any mutative APIs.