1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-12-08 20:11:08 +01:00

Update errorprone(-plugin) and make Unused(Variable|Method) an error

This commit is contained in:
Florian Schmaus 2019-05-07 22:58:02 +02:00
parent 68d7d738b6
commit 7f0dc72dab
46 changed files with 81 additions and 126 deletions

View file

@ -329,6 +329,21 @@ public class StanzaCollector implements AutoCloseable {
return resultQueue.size();
}
private String stringCache;
@Override
public String toString() {
if (stringCache == null) {
StringBuilder sb = new StringBuilder(128);
sb.append("Stanza Collector filter='").append(packetFilter).append('\'');
if (request != null) {
sb.append(" request='").append(request).append('\'');
}
stringCache = sb.toString();
}
return stringCache;
}
synchronized void notifyConnectionError(Exception exception) {
connectionException = exception;
notifyAll();

View file

@ -73,7 +73,6 @@ public class Socks4ProxySocketConnection implements ProxySocketConnection {
of all zero bits.
*/
index = 0;
buf[index++] = 4;
buf[index++] = 1;

View file

@ -368,6 +368,7 @@ public class PacketParserUtils {
return xml;
}
@SuppressWarnings("UnusedVariable")
private static CharSequence parseContentDepthWithRoundtrip(XmlPullParser parser, int depth, boolean fullNamespaces)
throws XmlPullParserException, IOException {
XmlStringBuilder sb = new XmlStringBuilder();