IBM Support

IZ78085: JAVA.UTIL.PROPERTIES.STORE(..)/LOAD(READER) DOESN'T SUPPORT NON-ASCII

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Error Message: Problem1:
    When read the property file by using Properties#load(Reader
    reader), trimmed the first double-byte space only no single byte
    space.
    Result of expectation is the following.
    key=?key1
    However, the result was the following.
    key=key1
    Problem2.
    When the line feed code is put with Properties#store in
    comments, only the first line is treated as a comment.
    ------------------------------------
    props.store(osw, "comment1\ncomment2");
    ------------------------------------
    Result of expectation is the following.
    #comment1
    #comment2
    However, the result was the following.
    #hoge
    hoge
    Problem3.
    When output the DBCS character by using
    Properties#store(OutputStream, comments), output in the form of
    not the character string but ?uxxxx.
    Properties#store(OutputStream, "?????1")
    Result of expectation is the following.
    key=?????1
    However, the result was the following.
    key=?u30d0?u30ea?u30e5?u30fc1
    .
    Stack Trace: N/A
    .
    

Local fix

Problem summary

  • As to java.util.Properties.store(output, comments) method,
    according to Java Spec: If the comments argument is not null,
    then '#' character and a line separator are first written to the
    output stream. Thus, the comments can serve as an identifying
    comment. Any '\n', '\r' or "\r\n" in comments is replaced by a
    line separator generated by the Writer and if the next character
    in comments is not character # or character ! then an ASCII # is
    written out after that line separator.
    As to java.util.Properties.load(Reader) method,
    if there is a non-ASCII space character, just ignore it.
    

Problem conclusion

  • This defect will be fixed in:
    6.0.0 SR9
    .
    The java.util.Properties.load(Reader) and store() method have
    been updated to prevent such a failure.
    .
    To obtain the fix:
    Install build 20100702 or later
    

Temporary fix

Comments

APAR Information

  • APAR number

    IZ78085

  • Reported component name

    JAVA CLASS LIBS

  • Reported component ID

    620700130

  • Reported release

    600

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2010-06-28

  • Closed date

    2010-07-01

  • Last modified date

    2010-07-01

  • 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 CLASS LIBS

  • Fixed component ID

    620700130

Applicable component levels

  • R600 PSN

       UP

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSCVQ3Y","label":"Java Class Libraries"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"6.0","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
01 July 2010