RFR: 8370368: Apply java.io.Serial annotations in java.security.jgss

Sergey Bylokhov serb at openjdk.org
Wed Oct 22 06:42:32 UTC 2025


On Wed, 22 Oct 2025 01:10:00 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:

> Please review the application of the `@Serial` annotation ([JDK-8202385](https://bugs.openjdk.org/browse/JDK-8202385)) to types in the java.security.jgss module to enable stricter compile-time checking of serialization-related declarations.
> 
> Example of a similar change https://github.com/openjdk/jdk/pull/24891.

src/java.security.jgss/windows/classes/sun/security/krb5/internal/tools/Ktab.java line 87:

> 85:         @java.io.Serial
> 86:         private static final long serialVersionUID = 0L;
> 87:         private final int errorCode;

Note that `private` will not affect the behavior of the code.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27925#discussion_r2450593596


More information about the security-dev mailing list