1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-22 03:52:06 +01:00

[core] Remove NumberFormatException from innermost try/catch in parseAndProcessStanza()

This was added in 02d8f53246 ("[core] Increase resilience against
faulty parser implementions"). However, NumberFormatException is a
subclass of IllegalArgumentException, which is already catched by the
outermost catch.
This commit is contained in:
Florian Schmaus 2024-10-15 15:46:24 +02:00
parent 0ee5acc494
commit 3b0c2f752f

View file

@ -1462,7 +1462,7 @@ public abstract class AbstractXMPPConnection implements XMPPConnection {
try {
try {
stanza = PacketParserUtils.parseStanza(parser, incomingStreamXmlEnvironment);
} catch (NullPointerException | NumberFormatException e) {
} catch (NullPointerException e) {
// Those exceptions should probably be wrapped into a SmackParsingException and therefore likely constitute a missing verification in the throwing parser.
String message = "Smack parser throw unexpected exception '" + e.getMessage() + "', please report this at " + Smack.BUG_REPORT_URL;
LOGGER.log(Level.SEVERE, message, e);