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

Bump "Error Prone" to 2.3.2

and gradle-errorprone-plugin to 0.6.
This commit is contained in:
Florian Schmaus 2018-10-31 16:06:31 +01:00
parent ec7badfda0
commit b7ea226c56
65 changed files with 173 additions and 149 deletions

View file

@ -112,7 +112,10 @@ public class HashElement implements ExtensionElement {
if (other == null || !(other instanceof HashElement)) {
return false;
}
return this.hashCode() == other.hashCode();
HashElement otherHashElement = (HashElement) other;
return this.getAlgorithm() == otherHashElement.getAlgorithm() &&
this.getHashB64().equals(otherHashElement.getHashB64());
}
@Override

View file

@ -79,6 +79,7 @@ public final class Thing {
private String toStringCache;
@SuppressWarnings("ObjectToString")
@Override
public String toString() {
if (toStringCache == null) {

View file

@ -149,6 +149,8 @@ public final class IoTDiscoveryManager extends Manager {
connection.registerIQRequestHandler(new AbstractIqRequestHandler(IoTDisowned.ELEMENT, IoTDisowned.NAMESPACE,
IQ.Type.set, Mode.sync) {
@SuppressWarnings("ObjectToString")
@Override
public IQ handleIQRequest(IQ iqRequest) {
if (!isRegistry(iqRequest.getFrom())) {

View file

@ -125,7 +125,10 @@ public class Range implements NamedElement {
return false;
}
return this.hashCode() == other.hashCode();
Range otherRange = (Range) other;
return this.getOffset() == otherRange.getOffset() &&
this.getLength() == otherRange.getLength() &&
this.getHash().equals(otherRange.getHash());
}
@Override

View file

@ -92,7 +92,7 @@ public class MamQueryIQ extends IQ {
if (field == null) {
throw new IllegalArgumentException("If a data form is given it must posses a hidden form type field");
}
if (!field.getValues().get(0).equals(MamElements.NAMESPACE)) {
if (!field.getValues().get(0).toString().equals(MamElements.NAMESPACE)) {
throw new IllegalArgumentException(
"Value of the hidden form type field must be '" + MamElements.NAMESPACE + "'");
}