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 2007/01/05 11:47:27 UTC
[jira] Resolved: (HARMONY-2941) [classlib][luni]No exception was
thrown when parseURL with limit = Integer.MIN_VALUE
[ https://issues.apache.org/jira/browse/HARMONY-2941?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tim Ellison resolved HARMONY-2941.
----------------------------------
Resolution: Fixed
Thanks Tony.
It seems like a somewhat esoteric edge case, but no harm in being compatible here.
Patch applied to LUNI module at repo revision r492972.
Please check that the patch was applied as you expected.
> [classlib][luni]No exception was thrown when parseURL with limit = Integer.MIN_VALUE
> ------------------------------------------------------------------------------------
>
> Key: HARMONY-2941
> URL: https://issues.apache.org/jira/browse/HARMONY-2941
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Tony Wu
> Assigned To: Tim Ellison
> Attachments: harmony-2941.diff
>
>
> RI throws exception in following testcase whereas harmony return silently
> public class URLStreamHandlerTest extends TestCase
> static class MyURLStreamHandler extends URLStreamHandler {
> @Override
> protected URLConnection openConnection(URL arg0) throws IOException {
> return null;
> }
> public void parse(URL url, String spec, int start, int end) {
> parseURL(url, spec, start, end);
> }
> }
> static class MyURLStreamHandlerFactory implements URLStreamHandlerFactory {
> public static MyURLStreamHandler handler = new MyURLStreamHandler();
> public URLStreamHandler createURLStreamHandler(String arg0) {
> handler = new MyURLStreamHandler();
> return handler;
> }
> }
> public void test_parseURL() throws MalformedURLException {
> URL.setURLStreamHandlerFactory(new MyURLStreamHandlerFactory());
> URL url = new URL("http://localhost");
> MyURLStreamHandler handler = MyURLStreamHandlerFactory.handler;
> try {
> handler.parse(url, "//", 0, Integer.MIN_VALUE);
> fail("Should throw SIOOBE.");
> } catch (StringIndexOutOfBoundsException e) {
> // expected;
> }
> }
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira