Project

Profile

Help

Bug #6337

closed

Durations incorrectly compare as not equal

Added by Michael Kay 3 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
2024-02-05
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

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.

Actions #1

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

Also available in: Atom PDF