changeset 6850:abe1cb2d27cb

8024306: Enhance Subject consistency Summary: Also reviewed by Alexander Fomin Reviewed-by: mullan, ahgross
author weijun
date Fri, 13 Sep 2013 15:17:31 +0800
parents 41dc340af6aa
children d5f36e1c927e
files src/share/classes/javax/security/auth/Subject.java
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/javax/security/auth/Subject.java	Thu Sep 12 14:41:14 2013 -0700
+++ b/src/share/classes/javax/security/auth/Subject.java	Fri Sep 13 15:17:31 2013 +0800
@@ -946,6 +946,10 @@
 
         s.defaultReadObject();
 
+        // Rewrap the principals into a SecureSet
+        principals = Collections.synchronizedSet(new SecureSet<Principal>
+                                (this, PRINCIPAL_SET, principals));
+
         // The Credential <code>Set</code> is not serialized, but we do not
         // want the default deserialization routine to set it to null.
         this.pubCredentials = Collections.synchronizedSet