1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2025-12-08 14:11:07 +01:00

Xlint all the things

and fix all warnings.
This commit is contained in:
Florian Schmaus 2015-03-23 09:27:15 +01:00
parent 7c5428ab0e
commit f546d28ad8
50 changed files with 142 additions and 122 deletions

View file

@ -484,8 +484,6 @@ public abstract class AbstractXMPPConnection implements XMPPConnection {
return streamId;
}
// TODO remove this suppression once "disable legacy session" code has been removed from Smack
@SuppressWarnings("deprecation")
protected void bindResourceAndEstablishSession(String resource) throws XMPPErrorException,
IOException, SmackException, InterruptedException {
@ -517,7 +515,10 @@ public abstract class AbstractXMPPConnection implements XMPPConnection {
Session.Feature sessionFeature = getFeature(Session.ELEMENT, Session.NAMESPACE);
// Only bind the session if it's announced as stream feature by the server, is not optional and not disabled
// For more information see http://tools.ietf.org/html/draft-cridland-xmpp-session-01
if (sessionFeature != null && !sessionFeature.isOptional() && !getConfiguration().isLegacySessionDisabled()) {
// TODO remove this suppression once "disable legacy session" code has been removed from Smack
@SuppressWarnings("deprecation")
boolean legacySessionDisabled = getConfiguration().isLegacySessionDisabled();
if (sessionFeature != null && !sessionFeature.isOptional() && !legacySessionDisabled) {
Session session = new Session();
packetCollector = createPacketCollectorAndSend(new StanzaIdFilter(session), session);
packetCollector.nextResultOrThrow();
@ -1083,6 +1084,7 @@ public abstract class AbstractXMPPConnection implements XMPPConnection {
// desired behavior.
return;
}
break;
default:
break;
}

View file

@ -577,6 +577,7 @@ public class PacketParserUtils {
}
break;
}
break;
case XmlPullParser.END_TAG:
if (parser.getDepth() == initialDepth) {
break outerloop;