Преглед на файлове

Add serialVersionUID to DefaultSavedRequest and SavedCookie

Closes gh-10594
Juan Carlos преди 3 години
родител
ревизия
2624150052

+ 4 - 1
web/src/main/java/org/springframework/security/web/savedrequest/DefaultSavedRequest.java

@@ -1,5 +1,5 @@
 /*
- * Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
+ * Copyright 2002-2022 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,6 +33,7 @@ import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
+import org.springframework.security.core.SpringSecurityCoreVersion;
 import org.springframework.security.web.PortResolver;
 import org.springframework.security.web.util.UrlUtils;
 import org.springframework.util.Assert;
@@ -61,6 +62,8 @@ import org.springframework.util.ObjectUtils;
  */
 public class DefaultSavedRequest implements SavedRequest {
 
+	private static final long serialVersionUID = SpringSecurityCoreVersion.SERIAL_VERSION_UID;
+
 	protected static final Log logger = LogFactory.getLog(DefaultSavedRequest.class);
 
 	private static final String HEADER_IF_NONE_MATCH = "If-None-Match";

+ 5 - 1
web/src/main/java/org/springframework/security/web/savedrequest/SavedCookie.java

@@ -1,5 +1,5 @@
 /*
- * Copyright 2002-2016 the original author or authors.
+ * Copyright 2002-2022 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -20,6 +20,8 @@ import java.io.Serializable;
 
 import jakarta.servlet.http.Cookie;
 
+import org.springframework.security.core.SpringSecurityCoreVersion;
+
 /**
  * Stores off the values of a cookie in a serializable holder
  *
@@ -27,6 +29,8 @@ import jakarta.servlet.http.Cookie;
  */
 public class SavedCookie implements Serializable {
 
+	private static final long serialVersionUID = SpringSecurityCoreVersion.SERIAL_VERSION_UID;
+
 	private final java.lang.String name;
 
 	private final java.lang.String value;