Changeset 7510


Ignore:
Timestamp:
Nov 1, 2018, 9:02:33 AM (3 years ago)
Author:
Nicklas Nordborg
Message:

References #2129: Preparations for Java 11 support

Fixes the errors in TestNumberFormat and TestDirty.

The problem was caused by a change in the default number formatting.

  • Scientific notation had changed from using E to ×10^. We need to explicitely change it back to E
  • Minus sign had changed from the regular minus at ascii(45) to a unicode minus at U+2212 (https://www.fileformat.info/info/unicode/char/2212/index.htm). We need to explicityely change it back to a regular minus sign.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/core/net/sf/basedb/util/NumberFormatUtil.java

    r4515 r7510  
    4141    sym.setDecimalSeparator(decimalSeparator);
    4242    sym.setGroupingSeparator(groupingSeparator);
     43    sym.setExponentSeparator("E");
     44    sym.setMinusSign('-');
    4345    DecimalFormat df = new DecimalFormat("0.#", sym);
    4446    df.setParseIntegerOnly(false);
Note: See TracChangeset for help on using the changeset viewer.