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: gurkanerdo...@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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to