Don't instantiate a new instance of a Filter if an instance was provided via the ServletContext.addFilter(String, Filter) method.
Patch provided by Ismael Juma.
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@
1059993 13f79535-47bb-0310-9956-
ffa450edef68
this.filter = null;
} else {
-
- // Allocate a new filter instance
- getFilter();
-
+ // Allocate a new filter instance if necessary
+ if (filterDef.getFilter() == null) {
+ getFilter();
+ }
}
}
<bug>50582</bug>: Refactor access logging so chunked encoding is not
forced for all requests if bytes sent is logged. (markt)
</fix>
+ <fix>
+ <bug>50597</bug>: Don't instantiate a new instance of a Filter if
+ an instance was provided via the
+ <code>ServletContext.addFilter(String, Filter)</code> method. Patch
+ provided by Ismael Juma. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Jasper">