private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
        in.defaultReadObject();
        boolean principalsExist = in.readBoolean();
        if (principalsExist) {
            this.realmPrincipals = (Map<String, Set>) in.readObject();
        }
    }
Serialization read support - reads in the Map principals collection if it exists in the
input stream.
<p/>
NOTE: Don't forget to change the serialVersionUID constant at the top of this class
if you make any backwards-incompatible serialization changes!!!
(use the JDK 'serialver' program for this)

@param in input stream provided by
@throws IOException            if there is an input/output problem
@throws ClassNotFoundException if the underlying Map implementation class is not available to the classloader.
core/src/main/java/org/apache/shiro/subject/SimplePrincipalCollection.java