You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Richard Liang (JIRA)" <ji...@apache.org> on 2007/03/13 11:32:09 UTC
[jira] Resolved: (HARMONY-3378)
[classlib][nio_char]IllegalStateException was thrown when encode with
malformed bytes.
[ https://issues.apache.org/jira/browse/HARMONY-3378?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Richard Liang resolved HARMONY-3378.
------------------------------------
Resolution: Fixed
Hello Tony,
The patch has been applied at revision r517635. Thanks a lot for this enhancement. Please verify this issue is fixed as you expected.
Best regards,
Richard.
> [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
> Assigned To: Richard Liang
> 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.