Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-9572

Replace all "BigDecimal ZERO" by BigDecimal.ZERO

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Implemented
    • Affects Version/s: None
    • Fix Version/s: Upcoming Branch
    • Component/s: None
    • Labels:
      None

      Description

      Using "BigDecimal ZERO" instead of BigDecimal.ZERO does not add anything but more useless code. They are both constants and the compiler will made them so.

      1. But, like in any BigDecimal comparison, values compared to BigDecimal.ZERO must be weighted by using setScale()
      2. Like I did in OFBIZ-9571 we must always use the setScale() variant with integer but the one with RoundingMode.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jacques.le.roux Jacques Le Roux
                Reporter:
                jacques.le.roux Jacques Le Roux
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: