Review request for java.text.** warning cleanup

John Rose john.r.rose at oracle.com
Thu Dec 1 22:30:07 PST 2011


On Dec 1, 2011, at 6:46 PM, Stuart Marks wrote:

> I have a question about this change to ParseException.java:
> 
> + at SuppressWarnings("serial") // Adding serial ID will break compatibility. Suppress it.
> 
> Is it really the case that adding the serialVersionUID will break compatibility? We've added this to other throwables, e.g. see
> 
> http://hg.openjdk.java.net/jdk8/jdk8/jdk/rev/624cc18a6cf9
> 
> The value declared here is the same as the unmodified version of the class. Unless there's something really weird going on with this class that I don't see, adding a serialVersionUID should improve compatibility, not break it.

Oops, good catch, Stuart.  This @SuppressWarnings does not look safe.   -- John


More information about the jdk8-dev mailing list