Deprecate SERIAL_VERSION_UID
Closes gh-17623
This commit is contained in:
+1
-1
@@ -35,7 +35,7 @@ import org.springframework.security.core.SpringSecurityCoreVersion;
|
||||
@Deprecated
|
||||
public class RunAsUserToken extends AbstractAuthenticationToken {
|
||||
|
||||
private static final long serialVersionUID = SpringSecurityCoreVersion.SERIAL_VERSION_UID;
|
||||
private static final long serialVersionUID = 620L;
|
||||
|
||||
private final Class<? extends Authentication> originalAuthentication;
|
||||
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ import org.springframework.security.core.SpringSecurityCoreVersion;
|
||||
*/
|
||||
public class RememberMeAuthenticationToken extends AbstractAuthenticationToken {
|
||||
|
||||
private static final long serialVersionUID = SpringSecurityCoreVersion.SERIAL_VERSION_UID;
|
||||
private static final long serialVersionUID = 620L;
|
||||
|
||||
private final Object principal;
|
||||
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
public class UsernamePasswordAuthenticationToken extends AbstractAuthenticationToken {
|
||||
|
||||
private static final long serialVersionUID = SpringSecurityCoreVersion.SERIAL_VERSION_UID;
|
||||
private static final long serialVersionUID = 620L;
|
||||
|
||||
private final Object principal;
|
||||
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ import org.springframework.security.core.SpringSecurityCoreVersion;
|
||||
*/
|
||||
public class JaasAuthenticationToken extends UsernamePasswordAuthenticationToken {
|
||||
|
||||
private static final long serialVersionUID = SpringSecurityCoreVersion.SERIAL_VERSION_UID;
|
||||
private static final long serialVersionUID = 620L;
|
||||
|
||||
private final transient LoginContext loginContext;
|
||||
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
public final class JaasGrantedAuthority implements GrantedAuthority {
|
||||
|
||||
private static final long serialVersionUID = SpringSecurityCoreVersion.SERIAL_VERSION_UID;
|
||||
private static final long serialVersionUID = 620L;
|
||||
|
||||
private final String role;
|
||||
|
||||
|
||||
@@ -41,7 +41,10 @@ public final class SpringSecurityCoreVersion {
|
||||
|
||||
/**
|
||||
* Global Serialization value for Spring Security classes.
|
||||
* @deprecated Please have each class use its own serialization version
|
||||
* @see SpringSecurityCoreVersionSerializableTests
|
||||
*/
|
||||
@Deprecated(forRemoval = true)
|
||||
public static final long SERIAL_VERSION_UID = 620L;
|
||||
|
||||
static final @Nullable String MIN_SPRING_VERSION = getSpringVersion();
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
public final class SimpleGrantedAuthority implements GrantedAuthority {
|
||||
|
||||
private static final long serialVersionUID = SpringSecurityCoreVersion.SERIAL_VERSION_UID;
|
||||
private static final long serialVersionUID = 620L;
|
||||
|
||||
private final String role;
|
||||
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ import org.springframework.util.ObjectUtils;
|
||||
*/
|
||||
public class SecurityContextImpl implements SecurityContext {
|
||||
|
||||
private static final long serialVersionUID = SpringSecurityCoreVersion.SERIAL_VERSION_UID;
|
||||
private static final long serialVersionUID = 620L;
|
||||
|
||||
private @Nullable Authentication authentication;
|
||||
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ import org.springframework.util.Assert;
|
||||
public class ReactiveSessionInformation implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = SpringSecurityCoreVersion.SERIAL_VERSION_UID;
|
||||
private static final long serialVersionUID = 620L;
|
||||
|
||||
private Instant lastAccessTime;
|
||||
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
public class SessionInformation implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = SpringSecurityCoreVersion.SERIAL_VERSION_UID;
|
||||
private static final long serialVersionUID = 620L;
|
||||
|
||||
private Date lastRequest;
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
public class User implements UserDetails, CredentialsContainer {
|
||||
|
||||
private static final long serialVersionUID = SpringSecurityCoreVersion.SERIAL_VERSION_UID;
|
||||
private static final long serialVersionUID = 620L;
|
||||
|
||||
private static final Log logger = LogFactory.getLog(User.class);
|
||||
|
||||
@@ -304,7 +304,7 @@ public class User implements UserDetails, CredentialsContainer {
|
||||
|
||||
private static class AuthorityComparator implements Comparator<GrantedAuthority>, Serializable {
|
||||
|
||||
private static final long serialVersionUID = SpringSecurityCoreVersion.SERIAL_VERSION_UID;
|
||||
private static final long serialVersionUID = 620L;
|
||||
|
||||
@Override
|
||||
public int compare(GrantedAuthority g1, GrantedAuthority g2) {
|
||||
|
||||
@@ -30,7 +30,7 @@ import org.springframework.security.core.userdetails.UserDetails;
|
||||
*/
|
||||
class MutableUser implements MutableUserDetails {
|
||||
|
||||
private static final long serialVersionUID = SpringSecurityCoreVersion.SERIAL_VERSION_UID;
|
||||
private static final long serialVersionUID = 620L;
|
||||
|
||||
private @Nullable String password;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user