JDK-6981095 : Additional -Xlint:serial warning
  • Type: Enhancement
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 7
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: generic
  • CPU: generic
  • Submitted: 2010-08-31
  • Updated: 2020-06-12
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Description
For full details, see thread here: 
http://mail.openjdk.java.net/pipermail/compiler-dev/2010-August/002243.html

Quote...
The JLS does not provide binary compatibility for compiler-generated
fields (such as reference to an outer class object from an inner class
object).  This means that there is no reliable way to use such classes
in serialization even if all involved classes implement
java.io.Serializable.  A mere recompilation of unchanged sources might
result in different compiler-generated names.

Would it make sense to enhance -Xlint:serial to warn about classes
which implement java.io.Serializable and contain compiler-generated
fields?

Comments
This covers a similar issue but a different case from JDK-7152104. This bug says to add a warning if a kind of class (e.g. anonymous inner class) is declared to implement Serializable. JDK-7152104 says NOT to warn if such a class is missing a SerialVersionUID static field. They're kind of flip sides of the same coin.
31-07-2013

Maurizio recommended Jan to look at this one.
18-07-2013