1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-22 06:12:05 +01:00

Fix SASLMechanism.compareTo(SASLMechanism)

Thanks to Aleksander Melnichnikov for pointing this out.
This commit is contained in:
Florian Schmaus 2017-02-02 16:08:37 +01:00
parent bf1e07e672
commit ffe9397e66

View file

@ -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());
}
/**