The JID class has a toBareJID() method that returns a String-based value. No variant exists that returns a JID instance. This leads to workaround code like the following:
A method should be provided that returns a JID instance representing a bare JID
Apart from the existing method public String toBareJID(), the JID class now has a new method with this signature: