summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sched/src/com/android/sched/util/Version.java14
1 files changed, 6 insertions, 8 deletions
diff --git a/sched/src/com/android/sched/util/Version.java b/sched/src/com/android/sched/util/Version.java
index c1b7746..3128edd 100644
--- a/sched/src/com/android/sched/util/Version.java
+++ b/sched/src/com/android/sched/util/Version.java
@@ -202,14 +202,12 @@ public class Version {
}
int compareTo(@Nonnull Version other) throws UncomparableVersion {
- if ((subReleaseKind == SubReleaseKind.ENGINEERING
- && other.getSubReleaseKind() != SubReleaseKind.ENGINEERING)
- || releaseCode < 0
- || subReleaseCode < 0
- || (subReleaseKind != SubReleaseKind.ENGINEERING
- && other.getSubReleaseKind() == SubReleaseKind.ENGINEERING)
- || other.getReleaseCode() < 0
- || other.getSubReleaseCode() < 0) {
+ if (subReleaseKind == SubReleaseKind.ENGINEERING
+ || releaseCode <= 0
+ || subReleaseCode <= 0
+ || other.getSubReleaseKind() == SubReleaseKind.ENGINEERING
+ || other.getReleaseCode() <= 0
+ || other.getSubReleaseCode() <= 0) {
throw new UncomparableVersion(
getVerboseVersion() + " is not comparable with " + other.getVerboseVersion());
}