mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-21 22:02:06 +01:00
Use Integer.compare(int, int) now that we are on Android 19
This commit is contained in:
parent
3e74d11b45
commit
ca7529c192
2 changed files with 2 additions and 4 deletions
|
@ -257,9 +257,8 @@ public abstract class SASLMechanism implements Comparable<SASLMechanism> {
|
|||
|
||||
@Override
|
||||
public final int compareTo(SASLMechanism other) {
|
||||
// Switch to Integer.compare(int, int) once Smack is on Android 19 or higher.
|
||||
Integer ourPriority = getPriority();
|
||||
return ourPriority.compareTo(other.getPriority());
|
||||
return Integer.compare(ourPriority, other.getPriority());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -47,8 +47,7 @@ public abstract class DiscoInfoLookupShortcutMechanism implements Comparable<Dis
|
|||
|
||||
@Override
|
||||
public final int compareTo(DiscoInfoLookupShortcutMechanism other) {
|
||||
// Switch to Integer.compare(int, int) once Smack is on Android 19 or higher.
|
||||
Integer ourPriority = getPriority();
|
||||
return ourPriority.compareTo(other.getPriority());
|
||||
return Integer.compare(ourPriority, other.getPriority());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue