cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1229332 [5/5] - in /cxf/trunk: common/common/src/main/java/org/apache/cxf/common/util/ rt/core/src/main/java/org/apache/cxf/bus/osgi/ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxr...
Date Mon, 09 Jan 2012 20:07:23 GMT
Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java?rev=1229332&r1=1229331&r2=1229332&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java
(original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java
Mon Jan  9 20:07:20 2012
@@ -477,7 +477,7 @@ public class JAXRSClientServerBookTest e
     
     @Test 
     public void testGetBookCollection2() throws Exception {
-        JAXBElementProvider provider = new JAXBElementProvider();
+        JAXBElementProvider<?> provider = new JAXBElementProvider<Object>();
         provider.setMarshallAsJaxbElement(true);
         provider.setUnmarshallAsJaxbElement(true);
         BookStore store = JAXRSClientFactory.create("http://localhost:" + PORT,
@@ -541,7 +541,7 @@ public class JAXRSClientServerBookTest e
     
     @Test
     public void testWebClientUnwrapBookWithXslt() throws Exception {
-        XSLTJaxbProvider provider = new XSLTJaxbProvider();
+        XSLTJaxbProvider<Book> provider = new XSLTJaxbProvider<Book>();
         provider.setInTemplate("classpath:/org/apache/cxf/systest/jaxrs/resources/unwrapbook.xsl");
         WebClient wc = WebClient.create("http://localhost:" + PORT + "/bookstore/books/wrapper",
                              Collections.singletonList(provider));
@@ -557,7 +557,7 @@ public class JAXRSClientServerBookTest e
     // uncomment once I can figure out how to set for this test only
     // com.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize - JAXB is a pain
     public void testProxyUnwrapBookWithXslt() throws Exception {
-        XSLTJaxbProvider provider = new XSLTJaxbProvider();
+        XSLTJaxbProvider<?> provider = new XSLTJaxbProvider<Object>();
         provider.setInTemplate("classpath:/org/apache/cxf/systest/jaxrs/resources/unwrapbook2.xsl");
         BookStore bs = JAXRSClientFactory.create("http://localhost:" + PORT, BookStore.class,
                              Collections.singletonList(provider));
@@ -1152,7 +1152,7 @@ public class JAXRSClientServerBookTest e
     
     @Test
     public void testPostGetBookAdapterList() throws Exception {
-        JAXBElementProvider provider = new JAXBElementProvider();
+        JAXBElementProvider<?> provider = new JAXBElementProvider<Object>();
         Map<String, String> outMap = new HashMap<String, String>();
         outMap.put("Books", "CollectionWrapper");
         outMap.put("books", "Book");
@@ -1167,7 +1167,7 @@ public class JAXRSClientServerBookTest e
     
     @Test
     public void testPostGetBookAdapterListJSON() throws Exception {
-        JAXBElementProvider provider = new JAXBElementProvider();
+        JAXBElementProvider<?> provider = new JAXBElementProvider<Object>();
         Map<String, String> outMap = new HashMap<String, String>();
         outMap.put("Books", "CollectionWrapper");
         outMap.put("books", "Book");

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerSpringBookTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerSpringBookTest.java?rev=1229332&r1=1229331&r2=1229332&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerSpringBookTest.java
(original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerSpringBookTest.java
Mon Jan  9 20:07:20 2012
@@ -80,7 +80,7 @@ public class JAXRSClientServerSpringBook
     @Test
     public void testPostGeneratedBook() throws Exception {
         String baseAddress = "http://localhost:" + PORT + "/the/generated/bookstore/books/1";
-        JAXBElementProvider provider = new JAXBElementProvider();
+        JAXBElementProvider<?> provider = new JAXBElementProvider<Object>();
         provider.setJaxbElementClassMap(Collections.singletonMap(
                                           "org.apache.cxf.systest.jaxrs.codegen.schema.Book",

                                           "{http://superbooks}thebook"));

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerStreamingTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerStreamingTest.java?rev=1229332&r1=1229331&r2=1229332&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerStreamingTest.java
(original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerStreamingTest.java
Mon Jan  9 20:07:20 2012
@@ -56,11 +56,11 @@ public class JAXRSClientServerStreamingT
             sf.setResourceClasses(BookStore.class);
             sf.setResourceProvider(BookStore.class,
                                    new SingletonResourceProvider(new BookStore()));
-            JAXBElementProvider p1 = new JAXBElementProvider();
+            JAXBElementProvider<?> p1 = new JAXBElementProvider<Object>();
             p1.setEnableBuffering(true);
             p1.setEnableStreaming(true);
             
-            JAXBElementProvider p2 = new CustomJaxbProvider();
+            JAXBElementProvider<?> p2 = new CustomJaxbProvider();
             p2.setProduceMediaTypes(Collections.singletonList("text/xml"));
             
             List<Object> providers = new ArrayList<Object>();
@@ -130,7 +130,7 @@ public class JAXRSClientServerStreamingT
     }
     
     @Ignore
-    public static class CustomJaxbProvider extends JAXBElementProvider {
+    public static class CustomJaxbProvider extends JAXBElementProvider<Object> {
         @Override
         protected XMLStreamWriter getStreamWriter(Object obj, OutputStream os, MediaType
mt) {
             if (mt.equals(MediaType.TEXT_XML_TYPE)) {

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSMultipartTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSMultipartTest.java?rev=1229332&r1=1229331&r2=1229332&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSMultipartTest.java
(original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSMultipartTest.java
Mon Jan  9 20:07:20 2012
@@ -644,10 +644,9 @@ public class JAXRSMultipartTest extends 
         return (Book)u.unmarshal(is);
     }
     
-    @SuppressWarnings("unchecked")
     private Book readJSONBookFromInputStream(InputStream is) throws Exception {
-        JSONProvider provider = new JSONProvider();
-        return (Book)provider.readFrom((Class)Book.class, Book.class, new Annotation[]{},

+        JSONProvider<Book> provider = new JSONProvider<Book>();
+        return provider.readFrom(Book.class, Book.class, new Annotation[]{}, 
                                  MediaType.APPLICATION_JSON_TYPE, null, is);
         
     }

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java?rev=1229332&r1=1229331&r2=1229332&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java
(original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java
Mon Jan  9 20:07:20 2012
@@ -209,7 +209,7 @@ public class JAXRSSoapBookTest extends A
         JAXRSClientFactoryBean bean = new JAXRSClientFactoryBean();
         bean.setAddress("http://localhost:" + PORT + "/test/services/rest3/bookstore/fastinfoset2");
         bean.getInInterceptors().add(new FIStaxInInterceptor());
-        JAXBElementProvider p = new JAXBElementProvider();
+        JAXBElementProvider<?> p = new JAXBElementProvider<Object>();
         p.setConsumeMediaTypes(Collections.singletonList("application/fastinfoset"));
         bean.setProvider(p);
         
@@ -230,7 +230,7 @@ public class JAXRSSoapBookTest extends A
         bean.setAddress("http://localhost:" + PORT + "/test/services/rest3/bookstore/fastinfoset");
         bean.getOutInterceptors().add(new FIStaxOutInterceptor());
         bean.getInInterceptors().add(new FIStaxInInterceptor());
-        JAXBElementProvider p = new JAXBElementProvider();
+        JAXBElementProvider<?> p = new JAXBElementProvider<Object>();
         p.setConsumeMediaTypes(Collections.singletonList("application/fastinfoset"));
         p.setProduceMediaTypes(Collections.singletonList("application/fastinfoset"));
         bean.setProvider(p);
@@ -250,7 +250,7 @@ public class JAXRSSoapBookTest extends A
     @Test
     public void testPostGetBookFastinfosetProxy() throws Exception {
         
-        JAXBElementProvider p = new JAXBElementProvider();
+        JAXBElementProvider<Object> p = new JAXBElementProvider<Object>();
         p.setConsumeMediaTypes(Collections.singletonList("application/fastinfoset"));
         p.setProduceMediaTypes(Collections.singletonList("application/fastinfoset"));
         
@@ -272,7 +272,7 @@ public class JAXRSSoapBookTest extends A
     @Test
     public void testPostGetBookFastinfosetProxyInterceptors() throws Exception {
         
-        JAXBElementProvider p = new JAXBElementProvider();
+        JAXBElementProvider<Object> p = new JAXBElementProvider<Object>();
         p.setConsumeMediaTypes(Collections.singletonList("application/fastinfoset"));
         p.setProduceMediaTypes(Collections.singletonList("application/fastinfoset"));
         

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/StringTextWriter.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/StringTextWriter.java?rev=1229332&r1=1229331&r2=1229332&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/StringTextWriter.java
(original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/StringTextWriter.java
Mon Jan  9 20:07:20 2012
@@ -32,7 +32,7 @@ import javax.ws.rs.core.UriInfo;
 
 import org.apache.cxf.jaxrs.provider.PrimitiveTextProvider;
 
-public class StringTextWriter extends PrimitiveTextProvider {
+public class StringTextWriter extends PrimitiveTextProvider<String> {
     
     @Context
     private UriInfo ui;
@@ -52,10 +52,10 @@ public class StringTextWriter extends Pr
         }
     }
     
-    public void writeTo(Object obj, Class<?> type, Type genType, Annotation[] anns,

+    public void writeTo(String obj, Class<?> type, Type genType, Annotation[] anns,

                         MediaType mt, MultivaluedMap<String, Object> headers,
                         OutputStream os) throws IOException {
-        if (obj instanceof String && type == String.class && type == genType)
{
+        if (type == String.class && type == genType) {
             obj = "Nonexistent method".equals(obj) ? "StringTextWriter - " + obj : obj; 
             super.writeTo(obj, type, genType, anns, mt, headers, os);
             return;

Modified: cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/JAXRSSamlTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/JAXRSSamlTest.java?rev=1229332&r1=1229331&r2=1229332&view=diff
==============================================================================
--- cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/JAXRSSamlTest.java
(original)
+++ cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/JAXRSSamlTest.java
Mon Jan  9 20:07:20 2012
@@ -77,7 +77,7 @@ public class JAXRSSamlTest extends Abstr
     @Test
     public void testGetBookSAMLTokenInForm() throws Exception {
         String address = "https://localhost:" + PORT + "/samlform/bookstore/books";
-        FormEncodingProvider formProvider = new FormEncodingProvider();
+        FormEncodingProvider<Form> formProvider = new FormEncodingProvider<Form>();
         formProvider.setExpectedEncoded(true);
         WebClient wc = createWebClient(address, new SamlFormOutInterceptor(),
                                        formProvider, true);

Modified: cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/security/WSSecurityClientTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/security/WSSecurityClientTest.java?rev=1229332&r1=1229331&r2=1229332&view=diff
==============================================================================
--- cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/security/WSSecurityClientTest.java
(original)
+++ cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/security/WSSecurityClientTest.java
Mon Jan  9 20:07:20 2012
@@ -160,6 +160,7 @@ public class WSSecurityClientTest extend
         // verify that the SoapHandlerInterceptor can peacefully co-exist
         // with the explicitly configured SAAJOutInterceptor
         //
+        @SuppressWarnings("rawtypes")
         List<Handler> handlerChain = new ArrayList<Handler>();
         Binding binding = ((BindingProvider)greeter).getBinding();
         TestOutHandler handler = new TestOutHandler();



Mime
View raw message