In DEBUG mode, when receiving xml containing \"<![CDATA[]]>\", the program crashes immediately

VERSION: 4.4.8

As soon as I connect to the server and log in, the server pushes a configuration update. The following exception then occurs, and the connection is immediately closed.

This issue will only be sent in debug mode.

The problem is that the received xml is printed in SmackDebugger, but when I have a custom content like in my xml, in the source code:

org.jxmpp.xml.splitter.XmlSplitter:

private void processChar(char c) throws IOException {

case AFTER_COMMENT_BANG:
case AFTER_COMMENT_DASH1:
case AFTER_COMMENT_DASH2:
case AFTER_COMMENT:
case AFTER_COMMENT_CLOSING_DASH1:
case AFTER_COMMENT_CLOSING_DASH2:
throw new UnsupportedOperationException();
}

}

“[” It would be considered a comment, but it wasn’t actually a comment, it was my message in the body.

There are two places where org.jxmpp.xml.splitter.XmlSplitter is used throughout the source code:
1、SmackDebugger
2、XmppTcpTransportModule

I’d like developers to fix them, or be able to customize XMLReader in it, rather than defining a private, not fully supported XmlSplitter.
It’s not friendly.

Connection XMPPTCPConnection[not-authenticated] (0) closed with error
java.lang.UnsupportedOperationException
at org.jxmpp.xml.splitter.XmlSplitter.processChar(XmlSplitter.java:376)
at org.jxmpp.xml.splitter.XmlSplitter.write(XmlSplitter.java:155)
at java.io.Writer.write(Writer.java:290)
at java.io.Writer.write(Writer.java:249)
at java.io.Writer.append(Writer.java:322)
at org.jivesoftware.smack.debugger.SmackDebugger.lambda$newConnectionReader$1$org-jivesoftware-smack-debugger-SmackDebugger(SmackDebugger.java:96)
at org.jivesoftware.smack.debugger.SmackDebugger$$ExternalSyntheticLambda1.read(D8$$SyntheticClass:0)
at org.jivesoftware.smack.util.ObservableReader.read(ObservableReader.java:52)
at com.android.org.kxml2.io.KXmlParser.fillBuffer(KXmlParser.java:1516)
at com.android.org.kxml2.io.KXmlParser.peekType(KXmlParser.java:993)
at com.android.org.kxml2.io.KXmlParser.next(KXmlParser.java:349)
at com.android.org.kxml2.io.KXmlParser.next(KXmlParser.java:313)
at org.jivesoftware.smack.xml.xpp3.Xpp3XmlPullParser.next(Xpp3XmlPullParser.java:228)
at org.jivesoftware.smack.util.PacketParserUtils.parseIQ(PacketParserUtils.java:540)
at org.jivesoftware.smack.util.PacketParserUtils.parseStanza(PacketParserUtils.java:113)
at org.jivesoftware.smack.AbstractXMPPConnection.parseAndProcessStanza(AbstractXMPPConnection.java:1449)
at org.jivesoftware.smack.tcp.XMPPTCPConnection.access$1000(XMPPTCPConnection.java:131)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPConnection.java:972)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$700(XMPPTCPConnection.java:916)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnection.java:939)

Thanks for reporting. Which input String causes this?

Ahh, I see. You mentioned it only in the posts title. Could you still send the complete stream element that is causing this?