Monday August 10, 2009
Joseph D. Darcy's Sun WeblogJoseph D. Darcy's Sun Weblog Reflective Operation Exceptions
Applying previously published advice on designing exception types, as of JDK 7 build 68, exceptions thrown by core reflection operations have been
retrofitted
to have a common superclass,
Inserting a new level into the superclass hierarchy in this fashion is a binary compatible change (JLSv3 § 13.4.4 Superclasses and Superinterfaces) since the exceptions remain subclasses of original superclass
All the exception classes in question already had explicit Post a Comment: Comments are closed for this entry. |
Calendar
RSS Feeds
All /Annotation Processing /General /Java /JavaOne /Numerics /OpenJDK SearchLinks
NavigationReferersToday's Page Hits: 22 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ReflectiveOperationException has strange serialVersionUID = 123456789L. Is it what intended?
Posted by Stepan Koltsov on August 11, 2009 at 06:16 PM PDT #
@Stepan,
All the serialVersionUIDs are strange; following good programming practice for a Serializable class (all exceptions are Serializable) I set the field explicitly to an arbitrary long value.
Posted by Joseph Darcy on August 11, 2009 at 06:27 PM PDT #
I personally use just 1 for serialVersionUID and increase it each time truly incompatible version is released. Gives a nice overview of how many compatibility breaking changes were done.
Posted by Artur Biesiadowski on August 12, 2009 at 06:41 AM PDT #