cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1382965 - /cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/XSLTJaxbProvider.java
Date Mon, 10 Sep 2012 16:18:16 GMT
Author: sergeyb
Date: Mon Sep 10 16:18:15 2012
New Revision: 1382965

URL: http://svn.apache.org/viewvc?rev=1382965&view=rev
Log:
Restricting XSLTJaxbProvider to support single beans only

Modified:
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/XSLTJaxbProvider.java

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/XSLTJaxbProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/XSLTJaxbProvider.java?rev=1382965&r1=1382964&r2=1382965&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/XSLTJaxbProvider.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/XSLTJaxbProvider.java
Mon Sep 10 16:18:15 2012
@@ -63,6 +63,7 @@ import org.xml.sax.XMLFilter;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.io.CachedOutputStream;
 import org.apache.cxf.jaxrs.ext.MessageContext;
+import org.apache.cxf.jaxrs.utils.InjectionUtils;
 import org.apache.cxf.jaxrs.utils.ResourceUtils;
 import org.apache.cxf.staxutils.StaxSource;
 import org.apache.cxf.staxutils.StaxUtils;
@@ -101,6 +102,9 @@ public class XSLTJaxbProvider<T> extends
     
     @Override
     public boolean isReadable(Class<?> type, Type genericType, Annotation[] anns, MediaType
mt) {
+        if (InjectionUtils.isSupportedCollectionOrArray(type)) {
+            return false;
+        }
         // JAXB support is required
         if (!super.isReadable(type, genericType, anns, mt)) {
             return false;
@@ -116,6 +120,9 @@ public class XSLTJaxbProvider<T> extends
     
     @Override
     public boolean isWriteable(Class<?> type, Type genericType, Annotation[] anns,
MediaType mt) {
+        if (InjectionUtils.isSupportedCollectionOrArray(type)) {
+            return false;
+        }
         // JAXB support is required
         if (!super.isReadable(type, genericType, anns, mt)) {
             return false;



Mime
View raw message