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

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 @Override
public final int compareTo(SASLMechanism other) { public final int compareTo(SASLMechanism other) {
// Switch to Integer.compare(int, int) once Smack is on Android 19 or higher.
Integer ourPriority = getPriority(); 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 @Override
public final int compareTo(DiscoInfoLookupShortcutMechanism other) { public final int compareTo(DiscoInfoLookupShortcutMechanism other) {
// Switch to Integer.compare(int, int) once Smack is on Android 19 or higher.
Integer ourPriority = getPriority(); Integer ourPriority = getPriority();
return ourPriority.compareTo(other.getPriority()); return Integer.compare(ourPriority, other.getPriority());
} }
} }