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

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 5.0.10
    • Fix Version/s: 5.0.11
    • Component/s: Components
    • Security Level: Jimmy
    • Labels:
      None

      Description

      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

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

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