On Fri, 8 Jan 2021 04:51:50 GMT, Sergey Bylokhov <s...@openjdk.org> wrote:

> Please review the application of `@java.io.Serial` annotation (JDK-8202385) 
> to types in the datatransfer module to enable stricter compile-time checking 
> of serialization-related declarations. 
> 
> This annotation can be applied to these methods in the module:
>   * private void writeObject(java.io.ObjectOutputStream stream) throws 
> IOException
>   * private void readObject(java.io.ObjectInputStream stream) throws 
> IOException, ClassNotFoundException
>   * private void readObjectNoData() throws ObjectStreamException 
>    * ANY-ACCESS-MODIFIER Object writeReplace() throws ObjectStreamException
>    * ANY-ACCESS-MODIFIER Object readResolve() throws ObjectStreamException
>    * private static final ObjectStreamField[] serialPersistentFields
>    * private static final long serialVersionUID
> 
> But only the `serialVersionUID` is updated since only this field is used in 
> the datatransfer module.
> 
> A similar fix was implemented for java.base module as well:
> http://mail.openjdk.java.net/pipermail/core-libs-dev/2019-August/062046.html

Looks fine.

-------------

Marked as reviewed by darcy (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/1996

Reply via email to