RFR: 8355004: Apply java.io.Serial annotations in java.compiler
Chen Liang
liach at openjdk.org
Sun May 25 05:42:51 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!
I think this addition looks fine. Please wait till next week for someone else to review too.
-------------
Marked as reviewed by liach (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/24891#pullrequestreview-2866730028
More information about the compiler-dev
mailing list