Improved: [FB] Package org.apache.ofbiz.base.lang

(OFBIZ-9564)

Implemented method hashCode() because method equals() was implemented
Changed Exception to RuntimeException because no exception was thrown and the 
only occurring exception could be a runtimeexception

Thanks: Dennis Balkir

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804556 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jacques Le Roux
2017-08-09 15:44:00 +00:00
parent 3dc4efff2c
commit d232eae643
@@ -73,8 +73,13 @@ public class ComparableRange<T extends Comparable<T>> implements Range<T>, Compa
try {
ComparableRange<?> that = (ComparableRange<?>) obj;
return this.start.equals(that.start()) && this.end.equals(that.end());
} catch (Exception e) {}
return false;
} catch (RuntimeException e) {
return false;
}
}
public int hashCode() {
return super.hashCode();
}
public int compareTo(ComparableRange<T> range) {