harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vladimir Strigun (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-24) java.net.URLEncoder.encode(String s, String enc) doesn't throw UnsupportedEncodingException
Date Fri, 30 Dec 2005 15:06:03 GMT
java.net.URLEncoder.encode(String s, String enc) doesn't throw UnsupportedEncodingException
-------------------------------------------------------------------------------------------

         Key: HARMONY-24
         URL: http://issues.apache.org/jira/browse/HARMONY-24
     Project: Harmony
        Type: Bug
  Components: Classlib  
    Reporter: Vladimir Strigun
 Assigned to: Geir Magnusson Jr 


Corresponding to API specification method encode(String, String) of java.net.URLEncoder should
throw "UnsupportedEncodingException - If the named encoding is not supported".   But the test
shows that Harmony implementation doesn't throw an exception.

import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;

public class Test {       
    public static void main(String[] args) {  
        try { 
            System.out.println("URLEncoder.encode="+URLEncoder.encode("str","unknown_enc"));
      
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace(); 
        }
    } 
}


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