Skip to main content

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


Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 

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

Copyright and trademark information

IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.

Rate this page:


(0 users)Average rating

Add comments

Document information

Runtimes for Java Technology

Java Class Libraries


Software version:
5.0


Reference #:
IV25017


Modified date:
2012-08-17

Translate my page

Content navigation