Skip to content

Commit d054865

Browse files
committed
8371975: Apply java.io.Serial annotations in java.security.sasl
Reviewed-by: mullan
1 parent 23c3975 commit d054865

File tree

6 files changed

+22
-6
lines changed

6 files changed

+22
-6
lines changed

src/java.security.sasl/share/classes/com/sun/security/sasl/Provider.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -24,6 +24,7 @@
2424
*/
2525
package com.sun.security.sasl;
2626

27+
import java.io.Serial;
2728
import java.security.NoSuchAlgorithmException;
2829
import java.security.InvalidParameterException;
2930
import java.security.ProviderException;
@@ -45,6 +46,7 @@
4546

4647
public final class Provider extends java.security.Provider {
4748

49+
@Serial
4850
private static final long serialVersionUID = 8622598936488630849L;
4951

5052
private static final String info = "Sun SASL provider" +

src/java.security.sasl/share/classes/javax/security/sasl/AuthenticationException.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
2525

2626
package javax.security.sasl;
2727

28+
import java.io.Serial;
29+
2830
/**
2931
* This exception is thrown by a SASL mechanism implementation
3032
* to indicate that the SASL
@@ -79,5 +81,6 @@ public AuthenticationException (String detail, Throwable ex) {
7981
}
8082

8183
/** Use serialVersionUID from JSR 28 RI for interoperability */
84+
@Serial
8285
private static final long serialVersionUID = -3579708765071815007L;
8386
}

src/java.security.sasl/share/classes/javax/security/sasl/AuthorizeCallback.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
2525

2626
package javax.security.sasl;
2727

28+
import java.io.Serial;
29+
2830
import javax.security.auth.callback.Callback;
2931

3032
/**
@@ -141,5 +143,6 @@ public void setAuthorizedID(String id) {
141143
authorizedID = id;
142144
}
143145

146+
@Serial
144147
private static final long serialVersionUID = -2353344186490470805L;
145148
}

src/java.security.sasl/share/classes/javax/security/sasl/RealmCallback.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
2525

2626
package javax.security.sasl;
2727

28+
import java.io.Serial;
29+
2830
import javax.security.auth.callback.TextInputCallback;
2931

3032
/**
@@ -63,5 +65,6 @@ public RealmCallback(String prompt, String defaultRealmInfo) {
6365
super(prompt, defaultRealmInfo);
6466
}
6567

68+
@Serial
6669
private static final long serialVersionUID = -4342673378785456908L;
6770
}

src/java.security.sasl/share/classes/javax/security/sasl/RealmChoiceCallback.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
2525

2626
package javax.security.sasl;
2727

28+
import java.io.Serial;
29+
2830
import javax.security.auth.callback.ChoiceCallback;
2931

3032
/**
@@ -58,5 +60,6 @@ public RealmChoiceCallback(String prompt, String[]choices,
5860
super(prompt, choices, defaultChoice, multiple);
5961
}
6062

63+
@Serial
6164
private static final long serialVersionUID = -8588141348846281332L;
6265
}

src/java.security.sasl/share/classes/javax/security/sasl/SaslException.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1999, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
2626
package javax.security.sasl;
2727

2828
import java.io.IOException;
29+
import java.io.Serial;
2930

3031
/**
3132
* This class represents an error that has occurred when using SASL.
@@ -125,5 +126,6 @@ public String toString() {
125126
}
126127

127128
/** Use serialVersionUID from JSR 28 RI for interoperability */
129+
@Serial
128130
private static final long serialVersionUID = 4579784287983423626L;
129131
}

0 commit comments

Comments
 (0)