hg: jdk8/tl/jdk: 7080020: Add conventional constructors to InternalError and VirtualMachineError
Joe Darcy
joe.darcy at oracle.com
Thu Aug 25 16:01:16 UTC 2011
Eamonn McManus wrote:
> Could we perhaps have the JDK build use an annotation processor that
> requires every public class in java.* javax.* etc that is serializable
> to either declare a serialVersionUID or have
> @SuppressWarnings("serial")? The amount of grief we have had over the
> years with this would easily justify the effort.
We could achieve that effect using the "-Xlint:serial -Werror" option to
javac during the JDK build.
-Joe
>
> Éamonn
>
>
> On 25/8/11 9:00 AM, Joe Darcy wrote:
>> Alan Bateman wrote:
>>> Joe Darcy wrote:
>>>> Hi Alan.
>>>>
>>>> I did check for that point in my review :-)
>>>>
>>>> The VirtualMachineError class is abstract so as long as all its
>>>> subclasses declare a serialVersionUID, like InternalError does, I
>>>> think we're fine.
>>> We need to check the serialization protocol but I'm pretty the
>>> object stream class of the supertype goes into the stream too. Also
>>> I quickly checked an an up-to-date build of jdk8/tl and its
>>> currently unable to deserialize streams contain any of the virtual
>>> machine errors like OutOfMemoryError, StackOverflowError, etc.
>>
>> *sigh*
>>
>> Thanks for checking on this Alan; I'll prepare a changeset with the
>> explicit serialVersionUID on InternalError.
>>
>> -Joe
>>
More information about the core-libs-dev
mailing list