Improved: [FB] Package org.apache.ofbiz.base.lang
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
@@ -73,9 +73,14 @@ 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) {}
+ } catch (RuntimeException e) {
return false;
}
+ }
+
+ public int hashCode() {
+ return super.hashCode();
+ }
public int compareTo(ComparableRange<T> range) {
if (this == range) {
