mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-22 06:12:05 +01:00
[tcp] Log XmlStringBuilder NPEs and the causing class
This commit is contained in:
parent
5bd247c3e6
commit
018cba7f4f
1 changed files with 6 additions and 1 deletions
|
@ -1318,7 +1318,12 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
|
||||||
|
|
||||||
CharSequence elementXml = element.toXML(outgoingStreamXmlEnvironment);
|
CharSequence elementXml = element.toXML(outgoingStreamXmlEnvironment);
|
||||||
if (elementXml instanceof XmlStringBuilder) {
|
if (elementXml instanceof XmlStringBuilder) {
|
||||||
|
try {
|
||||||
((XmlStringBuilder) elementXml).write(writer, outgoingStreamXmlEnvironment);
|
((XmlStringBuilder) elementXml).write(writer, outgoingStreamXmlEnvironment);
|
||||||
|
} catch (NullPointerException npe) {
|
||||||
|
LOGGER.log(Level.FINE, "NPE in XmlStringBuilder of " + element.getClass() + ": " + element, npe);
|
||||||
|
throw npe;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
writer.write(elementXml.toString());
|
writer.write(elementXml.toString());
|
||||||
|
|
Loading…
Reference in a new issue