#1247 Honor @SuppressWarnings("serial")

3.x
pending-rejected
None
5
2014-06-22
2014-01-27
David Harkness
No

I have some unit tests for abstract Serializable classes that declare a static inner class to be able to test it. Instead of generating a bogus serialVersionUID I prefer to annotation the class with

@SuppressWarnings("serial")

This stops Eclipse from indicating a problem, but the FindBugs plugin still generates an SE_NO_SERIALVERSIONID warning.

Discussion

    • Group: 3.0.0 --> 3.0.1
     
  • SupressWarnings retention policy is source only, means it is not written to the class file. FB can't also see this particular annotation. You can use SuppressFBWarnings annotation instead.
    Better would be if SuppressWarnings retention policy would be changed -> request to Oracle.
    Regards,
    Andrey

     
    • status: open --> pending-rejected
    • assigned_to: Andrey Loskutov