harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Ellison (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (HARMONY-6499) [classlib][luni] URLStreamHandler.parseURL throws different exception to RI in some cases
Date Tue, 15 Jun 2010 12:17:23 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-6499?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Tim Ellison resolved HARMONY-6499.

         Assignee: Tim Ellison
    Fix Version/s: 5.0M15
       Resolution: Fixed

Thanks Cath,

I applied a slightly reformatted version of the patch to the LUNI module at repo revision

I think we are pushing the bounds of RI compatibility here.  I applied it since it is a small
change to the compatibility changes already in place, but am left wondering how far this might
go ;-/

Please verify it was applied as you expected.

> [classlib][luni] URLStreamHandler.parseURL throws different exception to RI in some cases
> -----------------------------------------------------------------------------------------
>                 Key: HARMONY-6499
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6499
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Catherine Hope
>            Assignee: Tim Ellison
>             Fix For: 5.0M15
>         Attachments: 6499-2.patch, 6499.patch
> java.net.URLStreamHandler throws a SecurityException in some situations where the RI
will throw a StringIndexOutOfBoundsException.  From experimenting with test cases I think
the RI is checking bounds as it parses the URL and not up front, which causes some inconsistent
behaviour.  There's already one work-around added to this method in order to make it more
compatible (HARMONY-2941)
> The following all throw SecurityExceptions on Harmony (when called with a handler that
is not the URL's protocol handler) where they throw StringIndexOutOfBoundsExceptions on the
> handler.parse(url, "any", 10, Integer.MIN_VALUE);
> handler.parse(url, "any", 10, Integer.MIN_VALUE+1);
> handler.parse(url, "any", Integer.MIN_VALUE, Integer.MIN_VALUE);
> handler.parse(url, "any", Integer.MIN_VALUE, 2);

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message