Uploaded image for project: 'Empire-DB'
  1. Empire-DB
  2. EMPIREDB-171

ObjectUtils.compareEquals fails on BigDecimal

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • empire-db-2.4.0
    • empire-db-2.4.1
    • Core
    • None

    Description

      Observed:
      When comparing a BigDecimal with internal value e.g. '50' to another BigDecimal with internal value '50.00' ObjectUtils.compareEquals returns false as it internally forwards to the BigDecimal.equals method, which also relies on internal BigDecimal properties such as scale, etc.

      Expected:
      ObjectUtils.compareEquals should return true when comparing e.g. '50' to '50.00'

      Attachments

        Activity

          People

            Unassigned Unassigned
            cheazy Daniel Weidele
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified