[jsemver] 39/95: Remove redundant conditional statements
Alexandre Viau
reazem-guest at moszumanska.debian.org
Mon Feb 16 14:58:28 UTC 2015
This is an automated email from the git hooks/post-receive script.
reazem-guest pushed a commit to branch master
in repository jsemver.
commit d0f98e313043b9195b55ca00af65c75318305c7b
Author: Zafar Khaja <zafarkhaja at gmail.com>
Date: Tue Oct 29 21:47:10 2013 +0400
Remove redundant conditional statements
---
.../java/com/github/zafarkhaja/semver/MetadataVersion.java | 2 +-
src/main/java/com/github/zafarkhaja/semver/NormalVersion.java | 2 +-
src/main/java/com/github/zafarkhaja/semver/Version.java | 10 +++++-----
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/main/java/com/github/zafarkhaja/semver/MetadataVersion.java b/src/main/java/com/github/zafarkhaja/semver/MetadataVersion.java
index 70fdf24..f6f9d30 100644
--- a/src/main/java/com/github/zafarkhaja/semver/MetadataVersion.java
+++ b/src/main/java/com/github/zafarkhaja/semver/MetadataVersion.java
@@ -73,7 +73,7 @@ class MetadataVersion implements Comparable<MetadataVersion> {
if (!(other instanceof MetadataVersion)) {
return false;
}
- return compareTo((MetadataVersion) other) == 0 ? true : false;
+ return compareTo((MetadataVersion) other) == 0;
}
@Override
diff --git a/src/main/java/com/github/zafarkhaja/semver/NormalVersion.java b/src/main/java/com/github/zafarkhaja/semver/NormalVersion.java
index 51639b1..87a1510 100644
--- a/src/main/java/com/github/zafarkhaja/semver/NormalVersion.java
+++ b/src/main/java/com/github/zafarkhaja/semver/NormalVersion.java
@@ -106,7 +106,7 @@ class NormalVersion implements Comparable<NormalVersion> {
if (!(other instanceof NormalVersion)) {
return false;
}
- return compareTo((NormalVersion) other) == 0 ? true : false;
+ return compareTo((NormalVersion) other) == 0;
}
@Override
diff --git a/src/main/java/com/github/zafarkhaja/semver/Version.java b/src/main/java/com/github/zafarkhaja/semver/Version.java
index 74efc71..f18ad70 100644
--- a/src/main/java/com/github/zafarkhaja/semver/Version.java
+++ b/src/main/java/com/github/zafarkhaja/semver/Version.java
@@ -242,19 +242,19 @@ public class Version implements Comparable<Version> {
}
public boolean greaterThan(Version other) {
- return compareTo(other) > 0 ? true : false;
+ return compareTo(other) > 0;
}
public boolean greaterThanOrEqualTo(Version other) {
- return compareTo(other) >= 0 ? true : false;
+ return compareTo(other) >= 0;
}
public boolean lessThan(Version other) {
- return compareTo(other) < 0 ? true : false;
+ return compareTo(other) < 0;
}
public boolean lessThanOrEqualTo(Version other) {
- return compareTo(other) <= 0 ? true : false;
+ return compareTo(other) <= 0;
}
@Override
@@ -265,7 +265,7 @@ public class Version implements Comparable<Version> {
if (!(other instanceof Version)) {
return false;
}
- return compareTo((Version) other) == 0 ? true : false;
+ return compareTo((Version) other) == 0;
}
@Override
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/jsemver.git
More information about the pkg-java-commits
mailing list