Use Integer.compare(int, int) now that we are on Android 19

This commit is contained in:
Florian Schmaus 2019-08-04 23:03:42 +02:00
parent 3e74d11b45
commit ca7529c192
2 changed files with 2 additions and 4 deletions

View File

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

View File

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