In IntelliJ I activated the "Field May Be Final" inspection because of the project's coding guidelines.
But this makes no sense for Serializable
classes, where final
fields would cause serialization problems. Is there a possibility to automatically suppress this warning for classes that implement the Serializable
interface? My current workaround is to use @SuppressWarnings("FieldMayBeFinal")
.
As a reaction to Kayaman's comment: Serialization of final fields is an issue here as this does not work with the GWT
framework. Sorry, I should have mentioned that.