Bug 46304 - SecurityUtil -- no method caching for event() or doFilterEvent() ?
Summary: SecurityUtil -- no method caching for event() or doFilterEvent() ?
Alias: None
Product: Tomcat 6
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 6.0.18
Hardware: All All
: P3 minor (vote)
Target Milestone: default
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2008-11-26 21:26 UTC by Thomas Maslen
Modified: 2009-01-14 15:39 UTC (History)
1 user (show)


Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Maslen 2008-11-26 21:26:39 UTC
[No, this isn't a bug that has bitten me, I just noticed this in the code while
I was trying to get my head around what SecurityUtil does / doesn't do.  Also,
this is probably just a performance bug, not a real failure.  I noticed this
in the 6.0.18 source and confirmed that it's still on the trunk, even though
there have been code changes nearby, e.g revision 711600 for issue 46011].

ApplicationFilterChain.internalDoFilterEvent() invokes
SecurityUtil.doAsPrivileged() for "doFilterEvent" and "event", but as far as
I can see, SecurityUtil.createMethodAndCacheIt() will never cache the Method
descriptors for those two methods -- bad (for performance)?

Also...  the fix for issue 46011 modified internalDoFilter(), but should there
be a similar modification in internalDoFilterEvent() too?
Comment 1 Mark Thomas 2008-12-22 12:49:01 UTC
I have fixed the internalDoFilterEvent() oart if this issue in trunk and proposed it for 6.0.x
Comment 2 Mark Thomas 2008-12-22 13:13:08 UTC
I've fixed the performance issues in trunk. I do not intend to propose this for back port - it will be included with Tomcat 7.
Comment 3 Mark Thomas 2009-01-14 15:39:26 UTC
The patch has been applied to 6.0.x and will be included in 6.0.19 onwards.