Skip to content

Commit

Permalink
Changes for backward compatibility with java 1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
mdrillin authored and blafond committed Mar 31, 2015
1 parent ea6ec8b commit 44b689f
Showing 1 changed file with 6 additions and 8 deletions.
Expand Up @@ -322,7 +322,7 @@ public boolean isGreaterThan(ITeiidServerVersion otherVersion) {
try {
int myMax = Integer.parseInt(myMaxVersion.getMajor());
int otherMin = Integer.parseInt(otherMinVersion.getMajor());
majCompResult = Integer.compare(myMax, otherMin);
majCompResult = Integer.valueOf(myMax).compareTo(Integer.valueOf(otherMin));

} catch (NumberFormatException ex) {
// One or other is a string so compare lexographically
Expand All @@ -336,7 +336,7 @@ public boolean isGreaterThan(ITeiidServerVersion otherVersion) {
try {
int myMax = Integer.parseInt(myMaxVersion.getMinor());
int otherMin = Integer.parseInt(otherMinVersion.getMinor());
minCompResult = Integer.compare(myMax, otherMin);
minCompResult = Integer.valueOf(myMax).compareTo(Integer.valueOf(otherMin));

} catch (NumberFormatException ex) {
// One or other is a string so compare lexographically
Expand All @@ -350,7 +350,7 @@ public boolean isGreaterThan(ITeiidServerVersion otherVersion) {
try {
int myMax = Integer.parseInt(myMaxVersion.getMicro());
int otherMin = Integer.parseInt(otherMinVersion.getMicro());
micCompResult = Integer.compare(myMax, otherMin);
micCompResult = Integer.valueOf(myMax).compareTo(Integer.valueOf(otherMin));

} catch (NumberFormatException ex) {
// One or other is a string so compare lexographically
Expand All @@ -372,7 +372,7 @@ public boolean isLessThan(ITeiidServerVersion otherVersion) {
try {
int myMax = Integer.parseInt(myMaxVersion.getMajor());
int otherMin = Integer.parseInt(otherMinVersion.getMajor());
majCompResult = Integer.compare(myMax, otherMin);
majCompResult = Integer.valueOf(myMax).compareTo(Integer.valueOf(otherMin));

} catch (NumberFormatException ex) {
// One or other is a string so compare lexographically
Expand All @@ -386,8 +386,7 @@ public boolean isLessThan(ITeiidServerVersion otherVersion) {
try {
int myMax = Integer.parseInt(myMaxVersion.getMinor());
int otherMin = Integer.parseInt(otherMinVersion.getMinor());
minCompResult = Integer.compare(myMax, otherMin);

minCompResult = Integer.valueOf(myMax).compareTo(Integer.valueOf(otherMin));
} catch (NumberFormatException ex) {
// One or other is a string so compare lexographically
minCompResult = myMaxVersion.getMinor().compareTo(otherMinVersion.getMinor());
Expand All @@ -400,8 +399,7 @@ public boolean isLessThan(ITeiidServerVersion otherVersion) {
try {
int myMax = Integer.parseInt(myMaxVersion.getMicro());
int otherMin = Integer.parseInt(otherMinVersion.getMicro());
micCompResult = Integer.compare(myMax, otherMin);

micCompResult = Integer.valueOf(myMax).compareTo(Integer.valueOf(otherMin));
} catch (NumberFormatException ex) {
// One or other is a string so compare lexographically
micCompResult = myMaxVersion.getMicro().compareTo(otherMinVersion.getMicro());
Expand Down

0 comments on commit 44b689f

Please sign in to comment.