Bug #6337
closedDurations incorrectly compare as not equal
0%
Description
In 12.4 the internal representation of durations was changed to use a Java BigDecimal for the number of seconds in the duration. Comparison of durations uses BigDecimal.equals()
to compare whether two durations are the same. However, the Java method BigDecimal.equals()
compares the scale of the decimal value as well as its numerical value. Depending on how a duration was computed, two durations may have the same numerical value but have a different scale in their internal representations, which will cause them to compare incorrectly as being not equal.
Updated by Michael Kay 3 months ago
- Status changed from New to Closed
Correction. The change to use BigDecimal was made only on the main branch and not on the 12.x branch, so the bug is only in the development version of the code.
Please register to edit this issue