Add a missing check
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 30 Dec 2007 22:02:32 +0000 (22:02 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 30 Dec 2007 22:02:32 +0000 (22:02 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@607597 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/ha/session/SerializablePrincipal.java

index 20d5975..ebd2c9f 100644 (file)
@@ -105,8 +105,9 @@ public class SerializablePrincipal  implements java.io.Serializable {
             if (this.roles.length > 0)
                 Arrays.sort(this.roles);
         }
-        this.userPrincipal = userPrincipal;
-
+        if (userPrincipal instanceof Serializable) {
+            this.userPrincipal = userPrincipal;
+        }
     }