Last commit to xmpp-addr broke withLocal(String) for domain Jids

Issue #151 resolved
Daniel Gultsch created an issue

Ever since the refactor in the last commit to xmpp-addr creating a bare jid from a domain jid fails with NPE

Jid domainJid = Jid.of("domain.tld");
System.out.println(domainJid.withLocal("local").toEscapedString());

throws Exception in thread "main" java.lang.NullPointerException at java.base/java.lang.String.contentEquals(String.java:1095) at rocks.xmpp.addr.FullJid.withLocal(FullJid.java:394)

Comments (2)

  1. Christian Schudt repo owner

    Thanks for reporting this issue!

    Turned out "".equals(null) returns false while "".contentEquals(null) throws NPE.

  2. Log in to comment