@SuppressWarnings("unchecked")
    private LinkedHashMap<String, String> initializeSession() {
        var messages = sessionStore.get(context, SAML_STORAGE_KEY);
        if (messages.isEmpty()) {
            synchronized (context) {
                messages = sessionStore.get(context, SAML_STORAGE_KEY);
                if (messages.isEmpty()) {
                    messages = Optional.of(new LinkedHashMap<>());
                    updateSession((LinkedHashMap<String, String>) messages.get());
                }
            }
        }
        return (LinkedHashMap<String, String>) messages.get();
    }
Call to the method tries to load internalMessages hashtable object from the session, if the object doesn't exist
it will be created and stored.
<p>
Method synchronizes on session object to prevent two threads from overwriting each others hashtable.
pac4j-saml/src/main/java/org/pac4j/saml/store/HttpSessionStore.java