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] Updated: (HARMONY-3378) [classlib][nio_char]IllegalStateException was thrown when encode with malformed bytes.
Date Tue, 13 Mar 2007 10:11:09 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-3378?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Tony Wu updated HARMONY-3378:
-----------------------------

    Attachment: harmony-3378.diff

patch ready. would you pls try it? thanks.

> [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
>         Attachments: harmony-3378.diff
>
>
> 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.onMalformedInput(CodingErrorAction.REPLACE);
>         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.


Mime
View raw message