• Christian Schudt's avatar
    Language info should be in the Session, not in the Connection · 170b20cc
    Christian Schudt authored
    I feel the language (the stream's "xml:lang" attribute) should be in the Session interface rather than the Connection (similar as the stream id), because it's unrelated to the session's transport.
    
    The HttpSession already did that.
    
    Otherwise the used language is not easy to retrieve, e.g. when using SessionManager to get the session and OF-208 is hard to solve.
    
    Alternatively we can expose the Connection in the Session interface, but this approach feels wrong to me.
    
    Also use `java.util.Locale` rather than String, because it better reflects what can be in `xml:lang` (it can also have country codes, e.g. "de-CH")
    170b20cc
Session.java 7.49 KB