[jOOQ/jOOQ#9206] Wrong implementation of DayToSecond#equals() and YearToMonth#equals()

This commit is contained in:
Lukas Eder 2021-06-09 14:57:48 +02:00
parent 9d37e1fec4
commit 761a5df503
2 changed files with 4 additions and 0 deletions

View File

@ -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)

View File

@ -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)