From 47fd6befdec6761d61b50a560e5665d1108d5a4c Mon Sep 17 00:00:00 2001 From: Josh Cummings <3627351+jzheaux@users.noreply.github.com> Date: Mon, 3 Feb 2025 12:34:43 -0700 Subject: [PATCH] Ensure Serialization Compatibility for AuthenticationException Issue gh-16286 --- .../security/core/AuthenticationException.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/src/main/java/org/springframework/security/core/AuthenticationException.java b/core/src/main/java/org/springframework/security/core/AuthenticationException.java index e634738b69..9e1fb75608 100644 --- a/core/src/main/java/org/springframework/security/core/AuthenticationException.java +++ b/core/src/main/java/org/springframework/security/core/AuthenticationException.java @@ -16,6 +16,8 @@ package org.springframework.security.core; +import java.io.Serial; + /** * Abstract superclass for all exceptions related to an {@link Authentication} object * being invalid for whatever reason. @@ -24,6 +26,9 @@ package org.springframework.security.core; */ public abstract class AuthenticationException extends RuntimeException { + @Serial + private static final long serialVersionUID = 2018827803361503060L; + /** * Constructs an {@code AuthenticationException} with the specified message and root * cause.