2010/3/22 <[email protected]>:
> Author: markt
> Date: Mon Mar 22 13:18:31 2010
> New Revision: 926064
>
> URL: http://svn.apache.org/viewvc?rev=926064&view=rev
> Log:
> Fire listeners in reverse order for requestDestroyed
>
> Modified:
> tomcat/trunk/java/org/apache/catalina/core/StandardContextValve.java
>
> @@ -202,17 +202,18 @@ final class StandardContextValve
> (instances.length > 0)) {
> // create post-service event
> for (int i = 0; i < instances.length; i++) {
> - if (instances[i] == null)
> + int j = (instances.length -1) -i;
> + if (instances[j] == null)
> continue;
(...)
There is a more easy way to write the same loop:
for (int i = instances.length; (--i) >= 0; ) {
Best regards,
Konstantin Kolinko
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]