harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Liang (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-1157) [classlib][luni] String(byte[] bytes, int offset, int length, String charsetName) throws wrong exceptions
Date Fri, 11 Aug 2006 09:30:14 GMT
[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


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

        

Mime
View raw message