Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-941

The decimalbox with the roundingMode="UNNECESSARY" will not throw ArithmeticException when type a invalid value

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Normal Normal
    • 5.0.11
    • 5.0.10
    • Components
    • Security Level: Jimmy
    • None

      java
      double d = 1.239;
      DecimalFormat df = new DecimalFormat("#.##");
      df.setRoundingMode(RoundingMode.UNNECESSARY);
      System.out.print(df.format(d));
      

      it will throw an java.lang.ArithmeticException: Rounding needed with the rounding mode being set to RoundingMode.UNNECESSARY

      <decimalbox format="#.##" width="150px"  roundingMode="UNNECESSARY"/>
      

      type 1.239, it will round to 1.24

      numfmt.js
      line: 82
      shall handle UNNECESSARY case

            TonyQ TonyQ
            jimmyshiau jimmyshiau
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours
                3h