cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r992225 - /cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/factory/AnnotationsFactoryBeanListener.java
Date Fri, 03 Sep 2010 07:22:50 GMT
Author: ningjiang
Date: Fri Sep  3 07:22:49 2010
New Revision: 992225

URL: http://svn.apache.org/viewvc?rev=992225&view=rev
Log:
CXF-2971 Avoid the NPE of AnnotationsFactoryBeanListener

Modified:
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/factory/AnnotationsFactoryBeanListener.java

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/factory/AnnotationsFactoryBeanListener.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/factory/AnnotationsFactoryBeanListener.java?rev=992225&r1=992224&r2=992225&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/factory/AnnotationsFactoryBeanListener.java
(original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/factory/AnnotationsFactoryBeanListener.java
Fri Sep  3 07:22:49 2010
@@ -81,6 +81,10 @@ public class AnnotationsFactoryBeanListe
             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));



Mime
View raw message