tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 50138] Lack of synchronization in org.apache.catalina.security.SecurityUtil
Date Thu, 21 Oct 2010 13:52:03 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=50138

--- Comment #1 from Sebb <sebb@apache.org> 2010-10-21 09:51:59 EDT ---
That may not be the only bug. 

There are two instances of the following code:

if(objectCache.containsKey(targetObject)){
            methodsCache = objectCache.get(targetObject);

If the object is removed between the two statements, then an NPE will follow.

Surely the code should just check whether it got a non-null object?

Also, the private static fields should be final.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


Mime
View raw message