Log.debug("Restoring special presence for "+user); UserState us = name2state.get(user); if (us==null) { return; } PresenceRouter pr = server.getPresenceRouter(); for (SessionProxy sp : us.sessions) { sp.remove(); Presence p = sp.latestPresence; pr.route(p); }  name2state.remove(user); }
Log.debug("Restoring special presence for " + user); UserState us = name2state.get(user); if (us == null) { return; } PresenceRouter pr = server.getPresenceRouter(); List<SessionProxy> userStateSessionsCopy = new ArrayList<SessionProxy>(us.sessions); for (SessionProxy sp : userStateSessionsCopy) { sp.remove(); Presence p = sp.latestPresence; pr.route(p); }  name2state.remove(user); }
	public synchronized void restorePresence(String user) {		Log.debug("Restoring special presence for "+user);    	UserState us = name2state.get(user);    	if (us==null) {    		return;    	}    	PresenceRouter pr = server.getPresenceRouter();    	for (SessionProxy sp : us.sessions) {    		sp.remove();            Presence p = sp.latestPresence;             pr.route(p);	    	}    	// double, but does not hurt...    	name2state.remove(user);	}