RFR: 8355004: Apply java.io.Serial annotations in java.compiler [v2]

Joe Darcy darcy at openjdk.org
Fri May 30 02:27:53 UTC 2025


On Thu, 29 May 2025 15:58:15 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!
>
> Sergey Bylokhov has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
> 
>  - Merge branch 'openjdk:master' into serial_compiler
>  - use long literals
>  - Apply java.io.Serial annotations in java.compiler

Marked as reviewed by darcy (Reviewer).

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

PR Review: https://git.openjdk.org/jdk/pull/24891#pullrequestreview-2880035761


More information about the compiler-dev mailing list