From 354b043fd18c297e644caf7c71b15a1487e24b6b Mon Sep 17 00:00:00 2001 From: Luke Taylor Date: Fri, 18 Dec 2009 14:12:32 +0000 Subject: [PATCH] SEC-1337: Add Serializable interface to internal comparator --- .../org/springframework/security/core/userdetails/User.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/org/springframework/security/core/userdetails/User.java b/core/src/main/java/org/springframework/security/core/userdetails/User.java index 69587393b1..9c7b99efc5 100644 --- a/core/src/main/java/org/springframework/security/core/userdetails/User.java +++ b/core/src/main/java/org/springframework/security/core/userdetails/User.java @@ -15,6 +15,7 @@ package org.springframework.security.core.userdetails; +import java.io.Serializable; import java.util.Arrays; import java.util.Collection; import java.util.Collections; @@ -195,7 +196,7 @@ public class User implements UserDetails { return sortedAuthorities; } - private static class AuthorityComparator implements Comparator { + private static class AuthorityComparator implements Comparator, Serializable { public int compare(GrantedAuthority g1, GrantedAuthority g2) { // Neither should ever be null as each entry is checked before adding it to the set. // If the authority is null, it is a custom authority and should precede others.