IV25017: JAVA.LANG.STRINGINDEXOUTOFEXCEPTION THROWN WHILE FORMATTING BIGD ECIMAL NUMBER

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • Error Message: PrintStream.format() throws a
    StringIndexOutOfBoundsException while processing BigDecimal
    number of format xx.xx (multiple digits before and after the
    decimal point). Other formats like xx (no decimal point), x.xx
    (single digit before decimal point) and .xx (no digit before
    decimal point) works fine.
    .
    Stack Trace: Exception in thread main
    java.lang.StringIndexOutOfBoundsException
            at
    java.lang.StringBuilder.append(StringBuilder.java:120)
            at
    java.util.Formatter$FormatSpecifier$BigDecimalLayout.layout(Form
    atter
    .java:3716)
            at
    java.util.Formatter$FormatSpecifier$BigDecimalLayout.<init>(Form
    atter
    .java:3636)
            at
    java.util.Formatter$FormatSpecifier.print(Formatter.java:3571)
            at
    java.util.Formatter$FormatSpecifier.print(Formatter.java:3486)
            at
    java.util.Formatter$FormatSpecifier.printFloat(Formatter.java:27
    42)
            at
    java.util.Formatter$FormatSpecifier.print(Formatter.java:2690)
            at java.util.Formatter.format(Formatter.java:2456)
            at java.io.PrintStream.format(PrintStream.java:933)
            at TestTTR.main(TestTTR.java:21)
    .
    N/A
    

Local fix

  • N/A
    

Problem summary

  • Bigdecimal did not use sufficient capacity while creating the
    string buffer for handling the BigDecimal numbers of the format
    xx.xx (multiple digits before and after the decimal point). The
    string buffer was created with less capacity and tried to access
    the element beyond the buffer limit.
    

Problem conclusion

  • This defect will be fixed in:
    5.0.0 SR15
    .
    JDK has been updated to use sufficient capacity while creating
    the string buffer for handling BigDecimal numbers of the format
    xx.xx.
    

Temporary fix

  • N/A
    

Comments

APAR Information

  • APAR number

    IV25017

  • Reported component name

    JAVA 5 CLASS LI

  • Reported component ID

    620500130

  • Reported release

    500

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2012-07-23

  • Closed date

    2012-08-17

  • Last modified date

    2012-08-17

  • 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

    JAVA 5 CLASS LI

  • Fixed component ID

    620500130

Applicable component levels

  • R500 PSY

       UP



Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

Runtimes for Java Technology
Java Class Libraries

Software version:

5.0

Reference #:

IV25017

Modified date:

2012-08-17

Translate my page

Machine Translation

Content navigation