cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1422958 - /cxf/trunk/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/atom/AtomPojoProvider.java
Date Mon, 17 Dec 2012 14:55:19 GMT
Author: sergeyb
Date: Mon Dec 17 14:55:19 2012
New Revision: 1422958

URL: http://svn.apache.org/viewvc?rev=1422958&view=rev
Log:
AtomPojoProvider will throw NPE if interface classes are used

Modified:
    cxf/trunk/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/atom/AtomPojoProvider.java

Modified: cxf/trunk/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/atom/AtomPojoProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/atom/AtomPojoProvider.java?rev=1422958&r1=1422957&r2=1422958&view=diff
==============================================================================
--- cxf/trunk/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/atom/AtomPojoProvider.java
(original)
+++ cxf/trunk/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/atom/AtomPojoProvider.java
Mon Dec 17 14:55:19 2012
@@ -286,7 +286,7 @@ public class AtomPojoProvider extends Ab
         return null;
     }
     
-    private <T> T getAtomElementHandler(Map<String, T> handlers, Class<?>
pojoClass) {
+    protected <T> T getAtomElementHandler(Map<String, T> handlers, Class<?>
pojoClass) {
         T handler = getAtomElementHandlerSuperClass(handlers, pojoClass);
         if (handler == null) {
             Class<?>[] interfaces = pojoClass.getInterfaces();
@@ -301,7 +301,7 @@ public class AtomPojoProvider extends Ab
     }
     
     private <T> T getAtomElementHandlerSuperClass(Map<String, T> handlers, Class<?>
pojoClass) {
-        if (pojoClass == Object.class) {
+        if (pojoClass == null || pojoClass == Object.class) {
             return null;
         }
         T handler = handlers.get(pojoClass.getName());



Mime
View raw message