Fix SASLMechanism.compareTo(SASLMechanism)

Thanks to Aleksander Melnichnikov for pointing this out.
filetransferTypos
Florian Schmaus 6 years ago
parent bf1e07e672
commit ffe9397e66
  1. 4
      smack-core/src/main/java/org/jivesoftware/smack/sasl/SASLMechanism.java

@ -266,7 +266,9 @@ public abstract class SASLMechanism implements Comparable<SASLMechanism> {
}
public final int compareTo(SASLMechanism other) {
return getPriority() - other.getPriority();
// Switch to Integer.compare(int, int) once Smack is on Android 19 or higher.
Integer ourPriority = new Integer(getPriority());
return ourPriority.compareTo(other.getPriority());
}
/**

Loading…
Cancel
Save