#459 Check for Serial Version UID declaration

Check (274)
John Rutter

Check that a classes implementing java.io.Serializable also declare an explicit value for SerialVersionUID.

Due to inconsistencies and incompabitibilies between JDK releases and vendors, the default generation of SerialVersionUID is broken.

A check that could identify classes that implement the java.io.Serializable interface, but that do not also haev a static final declaration of the serialVersionUID value would allow this risk to be identified.


  • Roman Ivanov

    Roman Ivanov - 2016-06-24
    • status: open --> closed
    • Group: --> Future
  • Roman Ivanov

    Roman Ivanov - 2016-06-24

    chekcstyle do not know about class hierarchy at all, such check will produce a lot of false-negatives

    we could catch only cases when "class MyClass implement Serializable { .... } " doe snot have field with name SerialVersionUID.

    if that is still required please open issue on github issue tracker.


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