harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexei Zakharov" <alexei.zakha...@gmail.com>
Subject Re: [classlib][net] URLClassLoader findResource() problem
Date Fri, 23 Mar 2007 13:09:16 GMT
Hi Elena,

Elena Semukhina wrote:
> I attached another patch to the JIRA. Could you evaluate it please?

Thank you for the patch! I've made two corrections:
1. I've moved encoding of the resource name from findResourceImpl() to
the private method targetURL(). So this should fix other potential
bugs of the same kind - if "jar:" scheme is used for example.
2. The set of non-encoded characters was also changed from
URI.allLegal to (URI.someLegal + "/@") as it is done in URI itself for
parsing paths. Seems URI.allLegal contains characters like '[' and ']'
that should be encoded indeed. At least RI encodes it in this case.

Updated version was committed at the revision 521709.

Elena Semukhina wrote (in JIRA):
> I attached the second naive patch which solves the problem.

I'd like to say here that "naive" patches to *tests* are also highly
welcome. :) I've spent a couple of hours yesterday trying to extract a
minimal test case.

With Best Regards,

2007/3/22, Elena Semukhina <elena.semukhina@gmail.com>:
> On 3/21/07, Elena Semukhina <elena.semukhina@gmail.com> wrote:
> >
> > Hello,
> >
> > I found out that URLClassLoader.findResource() cannot find a resource if a
> > file name contains whitespaces.
> > I created https://issues.apache.org/jira/browse/HARMONY-3461 and attached
> > the test and the fix.
> >
> > Could anyone evaluate the suggested fix?
> >
> Alexei,
> thank you for evaluating and committing the fix. Unfortunately it solves the
> problem only partially. We have whitespaces in the returned URL while RI
> encodes them.
> I attached another patch to the JIRA. Could you evaluate it please?
> Elena

Alexei Zakharov,
Intel ESSD

View raw message