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 52042] New: Possible NullPointerException in DefaultInstanceManager#processAnnotations
Date Mon, 17 Oct 2011 14:39:00 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=52042

             Bug #: 52042
           Summary: Possible NullPointerException in
                    DefaultInstanceManager#processAnnotations
           Product: Tomcat 7
           Version: 7.0.22
          Platform: PC
            Status: NEW
          Severity: critical
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: gurkanerdogdu@yahoo.com
    Classification: Unclassified


NullPointerException exception is thrown randomly from
"DefaultInstanceManager#processAnnotations" method on the following lines,

 List<AnnotationCacheEntry> annotations;
            synchronized (annotationCache) {
                annotations = annotationCache.get(clazz).get();
            }

            //Null Pointer Exception is thrown, because annotations is NULL
            for (AnnotationCacheEntry entry : annotations) {


For example, I have a JSF Managed Bean 

public class X extends Y{
}

Open JSF page that contains managed bean X. Randomly opening the same page
throws NullPointerException because for superclass Y "annotations =
annotationCache.get(clazz).get();" returns null.

Using WeakHashMap on "annotationCache" field may be the reason of exception.

-- 
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