Skip to content

Commit

Permalink
[core] Remove NumberFormatException from innermost try/catch in parse…
Browse files Browse the repository at this point in the history
…AndProcessStanza()

This was added in 02d8f53 ("[core] Increase resilience against
faulty parser implementions"). However, NumberFormatException is a
subclass of IllegalArgumentException, which is already catched by the
outermost catch.
  • Loading branch information
Flowdalic committed Oct 15, 2024
1 parent 0ee5acc commit 3b0c2f7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1462,7 +1462,7 @@ protected void parseAndProcessStanza(XmlPullParser parser)
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);
Expand Down

0 comments on commit 3b0c2f7

Please sign in to comment.