> +
> +* Fix Close Stream at WebappClassLoader after read error
> +  http://svn.apache.org/viewvc?rev=772872&view=rev
> +  +1: pero
> +  -1:
> +

Nice catch, but what bugs me here
(in WebappClassLoader#findResourceInternal)
is the distance between opening the binaryStream and starting to use it.
There is a lot of processing, e.g.:
  if (!openJARs()) {
     return null;
  }
  if (antiJARLocking).

I think that
1) the stream should be closed where it was before Peter's change
(reverting rev.772872),
 but add setting binaryStream variable to null afterwards.
2) a global try/finally to be added around the whole method, closing the
stream in case of error or preliminary exit (e.g. caused by if (!openJARs())).

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to