You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Tony Wu (JIRA)" <ji...@apache.org> on 2007/03/13 11:05:09 UTC

[jira] Created: (HARMONY-3378) [classlib][nio_char]IllegalStateException was thrown when encode with malformed bytes.

[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.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.


[jira] Assigned: (HARMONY-3378) [classlib][nio_char]IllegalStateException was thrown when encode with malformed bytes.

Posted by "Richard Liang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3378?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard Liang reassigned HARMONY-3378:
--------------------------------------

    Assignee: Richard Liang

> [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.


[jira] Resolved: (HARMONY-3378) [classlib][nio_char]IllegalStateException was thrown when encode with malformed bytes.

Posted by "Richard Liang (JIRA)" <ji...@apache.org>.
     [ 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.


[jira] Updated: (HARMONY-3378) [classlib][nio_char]IllegalStateException was thrown when encode with malformed bytes.

Posted by "Tony Wu (JIRA)" <ji...@apache.org>.
     [ 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.


[jira] Commented: (HARMONY-3378) [classlib][nio_char]IllegalStateException was thrown when encode with malformed bytes.

Posted by "Tony Wu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12481043 ] 

Tony Wu commented on HARMONY-3378:
----------------------------------

verified at r518083, Thanks 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.