mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-29 15:32:06 +01:00
Fix SASLMechanism.compareTo(SASLMechanism)
Thanks to Aleksander Melnichnikov for pointing this out.
This commit is contained in:
parent
bf1e07e672
commit
ffe9397e66
1 changed files with 3 additions and 1 deletions
|
@ -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…
Reference in a new issue