if (person.isGuest()) {
final Integer personId = person.getID();
//Get or Create a shared GuestUserPreferencesManager for the Guest IPerson
//sync so multiple managers aren't created for a single guest
GuestUserPreferencesManager guestUserPreferencesManager;
synchronized (guestUserPreferencesManagers) {
guestUserPreferencesManager = guestUserPreferencesManagers.get(personId);
if (guestUserPreferencesManager == null) {
guestUserPreferencesManager = new GuestUserPreferencesManager(person);
guestUserPreferencesManagers.put(personId, guestUserPreferencesManager);
}
}
userInstance = new GuestUserInstance(person, guestUserPreferencesManager, request);