<Swing Dev> JDK 9 RFR of JDK-8034169: Fix serial lint warnings in javax.swing
Alan Bateman
Alan.Bateman at oracle.com
Thu Feb 13 10:31:26 UTC 2014
On 13/02/2014 08:00, Joe Darcy wrote:
> Hello,
>
> Please review the largely tedious but straightforward fix for
>
> JDK-8034169: Fix serial lint warnings in javax.swing
> http://cr.openjdk.java.net/~darcy/8034169.0/
>
> With the change, all of java.swing and it subclasses compile cleanly
> with the lint warning enabled.
>
> Generally the serial warnings were address by an
> @SuppressWarnings("serial") annotation; the annotation included a
> comment about the justification for the suppressions.
>
> In a small percentage of cases, a serialVersionUID field was added.
> When such a field was added, the serialver computation was checked for
> consistency on JDK6 and JDK 8.
>
> (Note that the javax.swing.text.html.parser.Element type has actually
> different serialVersionUIDs on JDK 6 and 8.)
I skimmed through the changes and I don't see anything obviously wrong.
However I am puzzled by some of the inconsistencies. For example in
javax.swing.event then some of the events have the warning but some do
not, they are examples in a few other packages too. This caught my eye
because of the addition of SUID to public types when I assumed they
would have the warning and so have @SuppressWarnings("serial"). Maybe
this needs someone familiar with the history in this area to say whether
it is true that some of the public types can be serialized in the
compatible way across releases.
-Alan
More information about the swing-dev
mailing list