RFR: 8370368: Apply java.io.Serial annotations in java.security.jgss [v3]
Sean Mullan
mullan at openjdk.org
Thu Oct 23 22:51:04 UTC 2025
On Thu, 23 Oct 2025 22:33:42 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:
>> 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;
>>
>> `errorCode` should have `@Serial` too.
>
>> `errorCode` should have `@Serial` too.
>
> I think you may have confused it with the `@serial` tag in Javadoc. This annotation can be applied to these methods/fields.
> * 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
Yes, you are right, easy to mistake those two since they have the same name!
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27925#discussion_r2457745621
More information about the security-dev
mailing list