[jOOQ/jOOQ#9206] Wrong implementation of DayToSecond#equals() and YearToMonth#equals()
This commit is contained in:
parent
9d37e1fec4
commit
761a5df503
@ -691,6 +691,8 @@ public final class DayToSecond extends Number implements Interval, Comparable<Da
|
||||
return false;
|
||||
if (seconds != other.seconds)
|
||||
return false;
|
||||
if (negative != other.negative && doubleValue() != 0.0)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
else if (obj instanceof YearToSecond)
|
||||
|
||||
@ -314,6 +314,8 @@ public final class YearToMonth extends Number implements Interval, Comparable<Ye
|
||||
return false;
|
||||
if (years != other.years)
|
||||
return false;
|
||||
if (negative != other.negative && intValue() != 0)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
else if (obj instanceof YearToSecond)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user