cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Willem Jiang (JIRA)" <j...@apache.org>
Subject [jira] Created: (CXF-2971) Avoid the NPE of AnnotationsFactoryBeanListener
Date Fri, 03 Sep 2010 07:22:32 GMT
Avoid the NPE of AnnotationsFactoryBeanListener 
------------------------------------------------

                 Key: CXF-2971
                 URL: https://issues.apache.org/jira/browse/CXF-2971
             Project: CXF
          Issue Type: Improvement
            Reporter: Willem Jiang
            Assignee: Willem Jiang
             Fix For: 2.3


{code}
Index: src/main/java/org/apache/cxf/service/factory/AnnotationsFactoryBeanListener.java
===================================================================
--- src/main/java/org/apache/cxf/service/factory/AnnotationsFactoryBeanListener.java	(revision
992197)
+++ src/main/java/org/apache/cxf/service/factory/AnnotationsFactoryBeanListener.java	(working
copy)
@@ -81,6 +81,10 @@
             Class<?> cls = (Class<?>)args[2];
             Endpoint ep = (Endpoint)args[1];
             Bus bus = factory.getBus();
+            // To avoid the NPE
+            if (cls == null) {
+                return;
+            }
             addSchemaValidationSupport(ep, cls.getAnnotation(SchemaValidation.class));
             addFastInfosetSupport(ep, cls.getAnnotation(FastInfoset.class));
             addGZipSupport(ep, bus, cls.getAnnotation(GZIP.class));

{code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message