tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: svn commit: r772875 - /tomcat/tc6.0.x/trunk/STATUS.txt
Date Sun, 10 May 2009 02:03:33 GMT
> +
> +* 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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message