#1247 Honor @SuppressWarnings("serial")

3.x
pending-rejected
None
5
2014-06-22
2014-01-27
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

  • Andrey Loskutov

    Andrey Loskutov - 2014-06-19
    • Group: 3.0.0 --> 3.0.1
     
  • Andrey Loskutov

    Andrey Loskutov - 2014-06-22

    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

     
  • Andrey Loskutov

    Andrey Loskutov - 2014-06-22
    • status: open --> pending-rejected
    • assigned_to: Andrey Loskutov
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks