Integrated: 8355004: Apply java.io.Serial annotations in java.compiler
Sergey Bylokhov
serb at openjdk.org
Sat May 31 00:19:56 UTC 2025
On Fri, 25 Apr 2025 22:46:07 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:
> Please review the application of `@Serial` annotation ([JDK-8202385](https://bugs.openjdk.org/browse/JDK-8202385)) to types in the compiler module to enable stricter compile-time checking of serialization-related declarations. Just a few classes are covered.
>
> 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
>
> Any feedback or suggestions are welcome!
This pull request has now been integrated.
Changeset: 5ad02c98
Author: Sergey Bylokhov <serb at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/5ad02c98f1d9227bb6abdd37126f2a351d4e1a50
Stats: 46 lines in 8 files changed: 29 ins; 4 del; 13 mod
8355004: Apply java.io.Serial annotations in java.compiler
Reviewed-by: liach, darcy
-------------
PR: https://git.openjdk.org/jdk/pull/24891
More information about the compiler-dev
mailing list