VOOZH about

URL: https://www.ibm.com/support/pages/apar/IJ18031

⇱ IJ18031: INCORRECT RESULTS FROM JAVA.TEXT.DECIMALFORMAT


IJ18031: INCORRECT RESULTS FROM JAVA.TEXT.DECIMALFORMAT

APAR status

  • Closed as program error.

Error description

  • Error Message: After a period of correct operation, incorrect
    results were obtained from DecimalFormat.format where the
    parameter is a BigDecimal.doubleValue() expression. Errors in
    the output may include an incorrect number of trailing zeros
    after the decimal point, and incorrect rounding of the least
    significant digit.
    .
    Stack Trace: N/A
    .
    

Local fix

  • The problem is caused by the decimal format peephole
    optimisation and can be avoided by disabling that optimisation
    with
    -Xjit:disableDecimalFormatPeephole
    

Problem summary

  • The conversion of a BigDecimal to a double or float value and
    it's subsequent use by DecimalFormat.format involves a large
    amount of redundant work. The decimal format peephole attempted
    to avoid some of this work by combining elements of both methods
     into a single implementation. Unfortunately, maintaining
    identical behaviour for all of the possible formatting options
    was not achieved.
    

Problem conclusion

  • The faulty optimisation will be removed in a future release of
    the JVM. For now it has been disabled by default. If an
    application experiences a performance impact because of this
    change, and can tolerate the differences in behaviour described
    above, then the optimisation can be re-enabled by using the
    inverted option
    
    -Xjit:!disableDecimalFormatPeephole
    
    (NB there can only be a single active Xjit option on the JVM
    command line, so if multiple flags are required they can be
    combined with commas.)
    .
    This APAR will be fixed in the following Java Releases:
     7R1 SR4 FP50 (7.1.4.50)
     8 SR5 FP41 (8.0.5.41)
    
    .
    Contact your IBM Product's Service Team for these Service
    Refreshes and Fix Packs.
    For those running stand-alone, information about the available
    Service Refreshes and Fix Packs can be found at:
     https://www.ibm.com/developerworks/java/jdk/
    

Temporary fix

Comments

APAR Information

  • APAR number

    IJ18031

  • Reported component name

    JIT

  • Reported component ID

    620700124

  • Reported release

    130

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2019-07-31

  • Closed date

    2019-08-05

  • Last modified date

    2019-10-18

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    JIT

  • Fixed component ID

    620700124

Applicable component levels

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSC9HBA","label":"Just In Time (JIT) Compiler"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"130","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
18 October 2019