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