harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nina Rinskaya" <nina.rinsk...@gmail.com>
Subject Re: [classlib][luni] Please review HARMONY-1858 (Eclipse Help failure)
Date Wed, 18 Oct 2006 09:06:06 GMT
Paulex,

Thank you for your answer and for detailed explanation of your fix!
The issues reported are not reproducible with revision r464582 (see
JIRA-1858 update).

Thank you,
Nina

On 10/17/06, Paulex Yang <paulex.yang@gmail.com> wrote:
> Nina Rinskaya wrote:
> > Hi all,
> >
> > Could anyone please review the problem description and the fix
> > suggested for
> > https://issues.apache.org/jira/browse/HARMONY-1858#action_12442838?
> > Although the problem reported is not reproducible with the fix, I
> > suspect that the issue might need more thorough investigation and a
> > better fix. Thank you in advance!
> Oh, yes, I noticed same problem yesterday, and committed a fix(maybe a
> work around) at r464582 in another way,  I updated the Ln.249 of
> JarURLConnection in following way:
>     -        }else{
>     +        }else if(fileString != null){
>
> My understanding of JarURLConnection.findJarFile() is as follows:
> 1. If the url's protocol is "file", tries to create JarFile directly and
> return
> 2. Else if useCaches is true, tries to get it from cache and return
> 3. Else try to get InputStream from that URLConnection, and write the
> contents to a temp file, then construct a JarFile based on that temp
> file and return
> 4. Else, throw IOException
>
> The original implementation pass null as file name to openJarFile() in
> step 2, so that if the useCaches is false, NPE will be thrown, this is
> definitely a bug, as HARMONY-1858 shows.  The patch for HARMONY-1858
> tried to pass a externalForm as file name to openJarFile() instead, but
> if the url's protocol is not "file", there is no way to create a JarFile
> on that URL, so that the attempt will always throw IOException,
> findJarFile() will catch this exception and go into step 3. I thought
> the IOException thrown/catch is not necessary, instead I add a condition
> checking to openJarFile(), so that if the fileString is null, just
> return from openJarFile() and go into step 3. Comments?
>
> I also think these two methods, findJarFile()/openJarFile(), need some
> refactory to make them easier to understand, I will look at it when I
> get a little more time.
>
> >
> > Best regards,
> > Nina Rinskaya
> >
> > ---------------------------------------------------------------------
> > Terms of use : http://incubator.apache.org/harmony/mailing.html
> > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> > For additional commands, e-mail: harmony-dev-help@incubator.apache.org
> >
> >
>
>
> --
> Paulex Yang
> China Software Development Lab
> IBM
>
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Mime
View raw message