From 02c9058c3d0fc1a49cb6313b1bed9ab92332ea90 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Wed, 25 Nov 2020 20:50:58 +0100 Subject: [PATCH] [core] Remove @SuppressWarnings for parseContentDepthWithRoundtrip() Also use the most specific return type in the method's signature. --- .../java/org/jivesoftware/smack/util/PacketParserUtils.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/smack-core/src/main/java/org/jivesoftware/smack/util/PacketParserUtils.java b/smack-core/src/main/java/org/jivesoftware/smack/util/PacketParserUtils.java index 3501d8a2a..d5168ba50 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/util/PacketParserUtils.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/util/PacketParserUtils.java @@ -299,7 +299,7 @@ public class PacketParserUtils { */ public static CharSequence parseContentDepth(XmlPullParser parser, int depth, boolean fullNamespaces) throws XmlPullParserException, IOException { if (parser.supportsRoundtrip()) { - return parseContentDepthWithRoundtrip(parser, depth, fullNamespaces); + return parseContentDepthWithRoundtrip(parser, depth); } else { return parseContentDepthWithoutRoundtrip(parser, depth, fullNamespaces); } @@ -368,8 +368,7 @@ public class PacketParserUtils { return xml; } - @SuppressWarnings("UnusedVariable") - private static CharSequence parseContentDepthWithRoundtrip(XmlPullParser parser, int depth, boolean fullNamespaces) + private static XmlStringBuilder parseContentDepthWithRoundtrip(XmlPullParser parser, int depth) throws XmlPullParserException, IOException { XmlStringBuilder sb = new XmlStringBuilder(); XmlPullParser.Event event = parser.getEventType();