harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tony Wu (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-3378) [classlib][nio_char]IllegalStateException was thrown when encode with malformed bytes.
Date Tue, 13 Mar 2007 10:05:09 GMT
[classlib][nio_char]IllegalStateException was thrown when encode with malformed bytes.

                 Key: HARMONY-3378
                 URL: https://issues.apache.org/jira/browse/HARMONY-3378
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Tony Wu

following testcase passes on RI whereas throws IllegalStateException on Harmony.

public void test() throws CharacterCodingException {
        Charset cs = Charset.forName("UTF-8");
        CharsetEncoder encoder = cs.newEncoder();
        encoder = encoder.replaceWith(new byte[] { (byte) 0xef, (byte) 0xbf,
                (byte) 0xbd, });
        CharBuffer in = CharBuffer.wrap("\ud800");
        ByteBuffer out = encoder.encode(in);

note that the output replacement is incorrect.
Since it is a bug of ICU, I will record that in another JIRA.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message