You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by David Oxley <da...@staffplanner.co.uk> on 2002/08/27 16:45:51 UTC

Bug in WebappClassLoader

All, 

 

There is a couple of bugs in WebappClassLoader.

1. On line 953 there is a call to findClassInternal which could throw a
ClassNotFoundException that gets caught on line 979. This means that lines
963 through 973 will never get executed. i.e. Repositories added with the
method AddRepository will not get searched.

2. Also URL's returned from getURL are not encoded.

 

I have submitted a patch for these two problems, but I have not got tomcat 4
to compile yet so haven't tested the patch.

 

Comments or flames welcome. :)

 

Dave

Dave@Staffplanner.co.uk


Re: Bug in WebappClassLoader

Posted by Remy Maucherat <re...@apache.org>.
David Oxley wrote:
> All,
> 
>  
> 
> There is a couple of bugs in WebappClassLoader.
> 
> 1. On line 953 there is a call to findClassInternal which could throw a 
> ClassNotFoundException that gets caught on line 979. This means that 
> lines 963 through 973 will never get executed. i.e. Repositories added 
> with the method AddRepository will not get searched.

That one is a minor bug, so it will not be fixed until after the first 
TC 4.1 stable release.

> 2. Also URL's returned from getURL are not encoded.

Your fix is wrong (all the URL special characters would get encoded, 
including ':', '/' and others).

> I have submitted a patch for these two problems, but I have not got 
> tomcat 4 to compile yet so haven't tested the patch.

Please try to test patches a little bit before, it saves a few round trips.

> Comments or flames welcome. :)

Better luck next time then ;-)

Remy


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>