You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Tim Ellison (JIRA)" <ji...@apache.org> on 2006/08/16 23:01:14 UTC

[jira] Closed: (HARMONY-1157) [classlib][luni] String(byte[] bytes, int offset, int length, String charsetName) throws wrong exceptions

     [ http://issues.apache.org/jira/browse/HARMONY-1157?page=all ]

Tim Ellison closed HARMONY-1157.
--------------------------------


Verified by Richard.


> [classlib][luni] String(byte[] bytes, int offset, int length, String charsetName) throws wrong exceptions
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1157
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1157
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Richard Liang
>         Assigned To: Tim Ellison
>         Attachments: Harmony-1157.diff
>
>
> Hello,
> The constructor "String(byte[] bytes, int offset, int length, String charsetName)" has the same bug as Harmony-487[1]. When the charsetName is "", RI throws UnsupportedEncodingException, but Harmony throws IllegalCharsetNameException.
> If there is no objection, I will raise a JIRA and provide a patch for this issue. Thanks a lot.
> The following test passes on RI, but fails on Harmony:
>        try {
>            String str = new String(new byte[] {0x41, 0x42}, 0, 2, "");
>            fail("Should throw UnsupportedEncodingException");
>        } catch (UnsupportedEncodingException e) {
>            //expected
>        }
> [1]http://issues.apache.org/jira/browse/HARMONY-487 
> Best regards,
> Richard

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira