cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1229332 [4/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/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/JSONProviderTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/JSONProviderTest.java?rev=1229332&r1=1229331&r2=1229332&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/JSONProviderTest.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/JSONProviderTest.java Mon Jan  9 20:07:20 2012
@@ -74,7 +74,6 @@ import org.junit.Test;
 
 public class JSONProviderTest extends Assert {
 
-    @SuppressWarnings("unchecked")
     @Test
     public void testReadEmbeddedArray() throws Exception {
         String input = 
@@ -92,7 +91,7 @@ public class JSONProviderTest extends As
                + " }                   "
                + "}                    ";
         
-        Object storeObject = new JSONProvider().readFrom((Class)Store.class, null, null, 
+        Object storeObject = new JSONProvider<Store>().readFrom(Store.class, null, null, 
                                        null, null, new ByteArrayInputStream(input.getBytes()));
         Store store = (Store)storeObject;
         List<Book> books = store.getBooks();
@@ -101,7 +100,6 @@ public class JSONProviderTest extends As
         assertEquals("CXF 2", books.get(1).getName());
     }
     
-    @SuppressWarnings("unchecked")
     @Test
     public void testReadEmbeddedArrayWithNamespaces() throws Exception {
         String input = 
@@ -119,12 +117,12 @@ public class JSONProviderTest extends As
                + " }                   "
                + "}                    ";
         
-        JSONProvider p = new JSONProvider();
+        JSONProvider<QualifiedStore> p = new JSONProvider<QualifiedStore>();
         Map<String, String> namespaceMap = new HashMap<String, String>();
         namespaceMap.put("http://superbooks", "ns1");
         p.setNamespaceMap(namespaceMap);
         
-        Object storeObject = p.readFrom((Class)QualifiedStore.class, null, null, 
+        Object storeObject = p.readFrom(QualifiedStore.class, null, null, 
                                        null, null, new ByteArrayInputStream(input.getBytes()));
         QualifiedStore store = (QualifiedStore)storeObject;
         List<Book2> books = store.getBooks();
@@ -137,7 +135,8 @@ public class JSONProviderTest extends As
     @Test
     public void testWriteCollectionWithoutXmlRootElement() 
         throws Exception {
-        JSONProvider provider = new JSONProvider();
+        JSONProvider<List<org.apache.cxf.jaxrs.fortest.jaxb.SuperBook>> provider 
+            = new JSONProvider<List<org.apache.cxf.jaxrs.fortest.jaxb.SuperBook>>();
         provider.setCollectionWrapperName("{http://superbooks}SuperBooks");
         provider.setJaxbElementClassMap(Collections.singletonMap(
                 org.apache.cxf.jaxrs.fortest.jaxb.SuperBook.class.getName(), 
@@ -156,14 +155,13 @@ public class JSONProviderTest extends As
         assertEquals(expected, bos.toString());
     }
     
-    @SuppressWarnings("unchecked")
     @Test
     public void testReadFromTags() throws Exception {
-        MessageBodyReader<Object> p = new JSONProvider();
+        MessageBodyReader<Tags> p = new JSONProvider<Tags>();
         byte[] bytes = 
             "{\"Tags\":{\"list\":[{\"group\":\"b\",\"name\":\"a\"},{\"group\":\"d\",\"name\":\"c\"}]}}"
             .getBytes();
-        Object tagsObject = p.readFrom((Class)Tags.class, null, null, 
+        Object tagsObject = p.readFrom(Tags.class, null, null, 
                                           null, null, new ByteArrayInputStream(bytes));
         Tags tags = (Tags)tagsObject;
         List<TagVO> list = tags.getTags();
@@ -174,30 +172,28 @@ public class JSONProviderTest extends As
         assertEquals("d", list.get(1).getGroup());
     }
     
-    @SuppressWarnings("unchecked")
     @Test
     public void testReadFromTag() throws Exception {
-        MessageBodyReader<Object> p = new JSONProvider();
+        MessageBodyReader<TagVO> p = new JSONProvider<TagVO>();
         byte[] bytes = "{\"tagVO\":{\"group\":\"b\",\"name\":\"a\"}}"
             .getBytes();
-        Object tagsObject = p.readFrom((Class)TagVO.class, null, null, 
+        Object tagsObject = p.readFrom(TagVO.class, null, null, 
                                           null, null, new ByteArrayInputStream(bytes));
         TagVO tag = (TagVO)tagsObject;
         assertEquals("a", tag.getName());
         assertEquals("b", tag.getGroup());
     }
     
-    @SuppressWarnings("unchecked")
     @Test
     public void testReadFromQualifiedTag() throws Exception {
-        JSONProvider p = new JSONProvider();
+        JSONProvider<TagVO2> p = new JSONProvider<TagVO2>();
         Map<String, String> namespaceMap = new HashMap<String, String>();
         namespaceMap.put("http://tags", "ns1");
         p.setNamespaceMap(namespaceMap);
         byte[] bytes = "{\"ns1.thetag\":{\"group\":\"b\",\"name\":\"a\"}}"
             .getBytes();
-        Object tagsObject = p.readFrom((Class)TagVO2.class, null, null, 
-                                          null, null, new ByteArrayInputStream(bytes));
+        Object tagsObject = p.readFrom(TagVO2.class, null, null, 
+                                       null, null, new ByteArrayInputStream(bytes));
         TagVO2 tag = (TagVO2)tagsObject;
         assertEquals("a", tag.getName());
         assertEquals("b", tag.getGroup());
@@ -205,7 +201,7 @@ public class JSONProviderTest extends As
     
     @Test
     public void testReadFromUnwrappedTagWrapperName() throws Exception {
-        JSONProvider p = new JSONProvider();
+        JSONProvider<TagVO> p = new JSONProvider<TagVO>();
         p.setSupportUnwrapped(true);
         p.setWrapperName("tagVO");
         readUnwrapped(p);
@@ -213,7 +209,7 @@ public class JSONProviderTest extends As
     
     @Test
     public void testReadFromUnwrappedTagMap() throws Exception {
-        JSONProvider p = new JSONProvider();
+        JSONProvider<TagVO> p = new JSONProvider<TagVO>();
         p.setSupportUnwrapped(true);
         
         Map<String, String> map = new HashMap<String, String>();
@@ -224,15 +220,14 @@ public class JSONProviderTest extends As
     
     @Test
     public void testReadFromUnwrappedTagRoot() throws Exception {
-        JSONProvider p = new JSONProvider();
+        JSONProvider<TagVO> p = new JSONProvider<TagVO>();
         p.setSupportUnwrapped(true);
         readUnwrapped(p);
     }
     
     @Test
-    @SuppressWarnings("unchecked")
     public void testReadFromUnwrappedQualifiedTagRoot() throws Exception {
-        JSONProvider p = new JSONProvider();
+        JSONProvider<TagVO2> p = new JSONProvider<TagVO2>();
         p.setSupportUnwrapped(true);
         Map<String, String> namespaceMap = new HashMap<String, String>();
         namespaceMap.put("http://tags", "ns1");
@@ -240,18 +235,17 @@ public class JSONProviderTest extends As
         
         byte[] bytes = "{\"group\":\"b\",\"name\":\"a\"}"
             .getBytes();
-        Object tagsObject = p.readFrom((Class)TagVO2.class, null, null, 
+        Object tagsObject = p.readFrom(TagVO2.class, null, null, 
                                           null, null, new ByteArrayInputStream(bytes));
         TagVO2 tag = (TagVO2)tagsObject;
         assertEquals("a", tag.getName());
         assertEquals("b", tag.getGroup());
     }
     
-    @SuppressWarnings("unchecked")
-    private void readUnwrapped(JSONProvider p) throws Exception {
+    private void readUnwrapped(JSONProvider<TagVO> p) throws Exception {
         byte[] bytes = "{\"group\":\"b\",\"name\":\"a\"}"
             .getBytes();
-        Object tagsObject = p.readFrom((Class)TagVO.class, null, null, 
+        Object tagsObject = p.readFrom(TagVO.class, null, null, 
                                           null, null, new ByteArrayInputStream(bytes));
         TagVO tag = (TagVO)tagsObject;
         assertEquals("a", tag.getName());
@@ -260,7 +254,7 @@ public class JSONProviderTest extends As
     
     @Test
     public void testWriteToSingleTag() throws Exception {
-        JSONProvider p = new JSONProvider();
+        JSONProvider<TagVO> p = new JSONProvider<TagVO>();
         TagVO tag = createTag("a", "b");
         
         ByteArrayOutputStream os = new ByteArrayOutputStream();
@@ -273,14 +267,13 @@ public class JSONProviderTest extends As
         
     }
     
-    @SuppressWarnings("unchecked")
     @Test
     public void testCopyReaderToDocument() throws Exception {
         String s = "{\"tagVO\":{\"group\":\"b\",\"name\":\"a\"}}";
         
         ByteArrayInputStream is = new ByteArrayInputStream(s.getBytes());
         
-        Document doc = (Document)new JSONProvider().readFrom((Class)Document.class, Document.class, 
+        Document doc = new JSONProvider<Document>().readFrom(Document.class, Document.class, 
                   new Annotation[]{}, MediaType.APPLICATION_JSON_TYPE, 
                   new MetadataMap<String, String>(), is);
         ByteArrayOutputStream os = new ByteArrayOutputStream();
@@ -297,7 +290,7 @@ public class JSONProviderTest extends As
         
         ByteArrayOutputStream os = new ByteArrayOutputStream();
         
-        new JAXBElementProvider().writeTo(tag, TagVO.class, TagVO.class, 
+        new JAXBElementProvider<TagVO>().writeTo(tag, TagVO.class, TagVO.class, 
                   TagVO.class.getAnnotations(), MediaType.APPLICATION_XML_TYPE, 
                   new MetadataMap<String, Object>(), os);
         Document doc = DOMUtils.readXml(new StringReader(os.toString()));
@@ -305,7 +298,7 @@ public class JSONProviderTest extends As
         
         ByteArrayOutputStream os2 = new ByteArrayOutputStream();
         
-        new JSONProvider().writeTo(
+        new JSONProvider<Document>().writeTo(
                   doc, Document.class, Document.class, 
                   new Annotation[]{}, MediaType.APPLICATION_JSON_TYPE, 
                   new MetadataMap<String, Object>(), os2);
@@ -315,7 +308,7 @@ public class JSONProviderTest extends As
     
     @Test
     public void testWriteBookWithStringConverter() throws Exception {
-        JSONProvider p = new JSONProvider();
+        JSONProvider<Book> p = new JSONProvider<Book>();
         p.setConvertTypesToStrings(true);
         Book book = new Book("CXF", 125);
         
@@ -331,7 +324,7 @@ public class JSONProviderTest extends As
     
     @Test
     public void testWriteToSingleTagBadgerFish() throws Exception {
-        JSONProvider p = new JSONProvider();
+        JSONProvider<TagVO> p = new JSONProvider<TagVO>();
         p.setConvention("badgerfish");
         TagVO tag = createTag("a", "b");
         
@@ -347,7 +340,7 @@ public class JSONProviderTest extends As
     
     @Test
     public void testWriteToSingleQualifiedTag() throws Exception {
-        JSONProvider p = new JSONProvider();
+        JSONProvider<TagVO2> p = new JSONProvider<TagVO2>();
         Map<String, String> namespaceMap = new HashMap<String, String>();
         namespaceMap.put("http://tags", "ns1");
         p.setNamespaceMap(namespaceMap);
@@ -364,7 +357,7 @@ public class JSONProviderTest extends As
     
     @Test
     public void testWriteToSingleQualifiedTagBadgerFish() throws Exception {
-        JSONProvider p = new JSONProvider();
+        JSONProvider<TagVO2> p = new JSONProvider<TagVO2>();
         p.setConvention("badgerfish");
         TagVO2 tag = createTag2("a", "b");
         
@@ -380,7 +373,7 @@ public class JSONProviderTest extends As
     
     @Test
     public void testDropRootElement() throws Exception {
-        JSONProvider p = new JSONProvider();
+        JSONProvider<TagVO2> p = new JSONProvider<TagVO2>();
         p.setDropRootElement(true);
         Map<String, String> namespaceMap = new HashMap<String, String>();
         namespaceMap.put("http://tags", "ns1");
@@ -420,7 +413,7 @@ public class JSONProviderTest extends As
     
     public void doWriteQualifiedCollection(boolean drop, boolean serializeAsArray, String data) 
         throws Exception {
-        JSONProvider p = new JSONProvider();
+        JSONProvider<List<?>> p = new JSONProvider<List<?>>();
         p.setCollectionWrapperName("{http://tags}tag");
         p.setDropCollectionWrapperElement(drop);
         p.setSerializeAsArray(serializeAsArray);
@@ -441,7 +434,7 @@ public class JSONProviderTest extends As
     
     @Test
     public void testWriteUnqualifiedCollection() throws Exception {
-        JSONProvider p = new JSONProvider();
+        JSONProvider<List<Book>> p = new JSONProvider<List<Book>>();
         List<Book> books = new ArrayList<Book>();
         books.add(new Book("CXF", 123L));
         ByteArrayOutputStream os = new ByteArrayOutputStream();
@@ -461,13 +454,13 @@ public class JSONProviderTest extends As
     }
     
     @SuppressWarnings("unchecked")
-    private void doReadUnqualifiedCollection(String data, String mName, Class<?> type) throws Exception {
-        JSONProvider provider = new JSONProvider();
+    private <T> void doReadUnqualifiedCollection(String data, String mName, Class<T> type) throws Exception {
+        JSONProvider<T> provider = new JSONProvider<T>();
         Method m = CollectionsResource.class.getMethod(mName, 
                                                        new Class[]{type});
         ByteArrayInputStream is = new ByteArrayInputStream(data.getBytes());
         Object o = provider.readFrom(
-                      (Class)m.getParameterTypes()[0], m.getGenericParameterTypes()[0],
+                       type, m.getGenericParameterTypes()[0],
                        new Annotation[0], MediaType.APPLICATION_JSON_TYPE, 
                        new MetadataMap<String, String>(), is);
         assertNotNull(o);
@@ -509,7 +502,7 @@ public class JSONProviderTest extends As
         doReadQualifiedCollection(data, true);
     }
     
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings({ "unchecked", "rawtypes" })
     public void doReadQualifiedCollection(String data, boolean isArray) throws Exception {
         
         JSONProvider provider = new JSONProvider();
@@ -526,7 +519,7 @@ public class JSONProviderTest extends As
         
         ByteArrayInputStream is = new ByteArrayInputStream(data.getBytes());
         Object o = provider.readFrom(
-                      (Class)m.getParameterTypes()[0], m.getGenericParameterTypes()[0],
+                       m.getParameterTypes()[0], m.getGenericParameterTypes()[0],
                        new Annotation[0], MediaType.APPLICATION_JSON_TYPE, 
                        new MetadataMap<String, String>(), is);
         assertNotNull(o);
@@ -550,7 +543,7 @@ public class JSONProviderTest extends As
     
     @Test
     public void testWriteToSingleQualifiedTag2() throws Exception {
-        JSONProvider p = new JSONProvider();
+        JSONProvider<TagVO2> p = new JSONProvider<TagVO2>();
         TagVO2 tag = createTag2("a", "b");
         
         ByteArrayOutputStream os = new ByteArrayOutputStream();
@@ -586,7 +579,7 @@ public class JSONProviderTest extends As
         JAXBContext context = JAXBContext.newInstance(new Class[]{Books.class, Book.class});
         Unmarshaller um = context.createUnmarshaller();
         JAXBElement<?> jaxbEl = um.unmarshal(new StreamSource(is), Books.class);
-        JSONProvider p = new JSONProvider();
+        JSONProvider<JAXBElement<?>> p = new JSONProvider<JAXBElement<?>>();
         p.setIgnoreMixedContent(ignore);
         ByteArrayOutputStream os = new ByteArrayOutputStream();
         
@@ -598,7 +591,7 @@ public class JSONProviderTest extends As
     
     @Test
     public void testWriteListOfDerivedTypes() throws Exception {
-        JSONProvider p = new JSONProvider();
+        JSONProvider<Books2> p = new JSONProvider<Books2>();
         Map<String, String> namespaceMap = new HashMap<String, String>();
         namespaceMap.put("http://www.w3.org/2001/XMLSchema-instance", "xsins");
         p.setNamespaceMap(namespaceMap);
@@ -615,17 +608,16 @@ public class JSONProviderTest extends As
         assertEquals(data, s);
     }
     
-    @SuppressWarnings("unchecked")
     @Test
     public void testReadListOfDerivedTypes() throws Exception {
-        JSONProvider p = new JSONProvider();
+        JSONProvider<Books2> p = new JSONProvider<Books2>();
         Map<String, String> namespaceMap = new HashMap<String, String>();
         namespaceMap.put("http://www.w3.org/2001/XMLSchema-instance", "xsins");
         p.setNamespaceMap(namespaceMap);
         String data = "{\"books2\":{\"books\":{\"@xsins.type\":\"superBook\",\"id\":123,"
             + "\"name\":\"CXF Rocks\",\"superId\":124}}}";
         byte[] bytes = data.getBytes();
-        Object books2Object = p.readFrom((Class)Books2.class, null, null, 
+        Object books2Object = p.readFrom(Books2.class, null, null, 
                                           null, null, new ByteArrayInputStream(bytes));
         Books2 books = (Books2)books2Object;
         List<? extends Book> list = books.getBooks();
@@ -636,17 +628,16 @@ public class JSONProviderTest extends As
         assertEquals("CXF Rocks", book.getName());
     }
     
-    @SuppressWarnings("unchecked")
     @Test
     public void testReadListOfDerivedTypesWithNullField() throws Exception {
-        JSONProvider p = new JSONProvider();
+        JSONProvider<Books2> p = new JSONProvider<Books2>();
         Map<String, String> namespaceMap = new HashMap<String, String>();
         namespaceMap.put("http://www.w3.org/2001/XMLSchema-instance", "xsins");
         p.setNamespaceMap(namespaceMap);
         String data = "{\"books2\":{\"books\":{\"@xsins.type\":\"superBook\",\"id\":123,"
             + "\"name\":null,\"superId\":124}}}";
         byte[] bytes = data.getBytes();
-        Object books2Object = p.readFrom((Class)Books2.class, null, null, 
+        Object books2Object = p.readFrom(Books2.class, null, null, 
                                           null, null, new ByteArrayInputStream(bytes));
         Books2 books = (Books2)books2Object;
         List<? extends Book> list = books.getBooks();
@@ -658,7 +649,7 @@ public class JSONProviderTest extends As
     
     @Test
     public void testWriteToListWithManyValues() throws Exception {
-        JSONProvider p = new JSONProvider();
+        JSONProvider<Tags> p = new JSONProvider<Tags>();
         Tags tags = new Tags();
         tags.addTag(createTag("a", "b"));
         tags.addTag(createTag("c", "d"));
@@ -676,7 +667,7 @@ public class JSONProviderTest extends As
     
     @Test
     public void testWriteToListWithSingleValue() throws Exception {
-        JSONProvider p = new JSONProvider();
+        JSONProvider<Tags> p = new JSONProvider<Tags>();
         p.setSerializeAsArray(true);
         p.setArrayKeys(Collections.singletonList("list"));
         Tags tags = new Tags();
@@ -695,7 +686,7 @@ public class JSONProviderTest extends As
     
     @Test
     public void testWriteUsingNaturalNotation() throws Exception {
-        JSONProvider p = new JSONProvider();
+        JSONProvider<Post> p = new JSONProvider<Post>();
         p.setSerializeAsArray(true);
         p.setArrayKeys(Collections.singletonList("comments"));
         Post post = new Post();
@@ -721,7 +712,7 @@ public class JSONProviderTest extends As
     
     @Test
     public void testManyTags() throws Exception {
-        JSONProvider p = new JSONProvider();
+        JSONProvider<ManyTags> p = new JSONProvider<ManyTags>();
         p.setSerializeAsArray(true);
         p.setArrayKeys(Collections.singletonList("list"));
         
@@ -742,13 +733,12 @@ public class JSONProviderTest extends As
     }
 
     @Test
-    @SuppressWarnings("unchecked")
     public void testInDropElement() throws Exception {
         String data = "{\"Extra\":{\"ManyTags\":{\"tags\":{\"list\":[{\"group\":\"b\",\"name\":\"a\"}]}}}}";
-        JSONProvider provider = new JSONProvider();
+        JSONProvider<ManyTags> provider = new JSONProvider<ManyTags>();
         provider.setInDropElements(Collections.singletonList("Extra"));
         ByteArrayInputStream is = new ByteArrayInputStream(data.getBytes());
-        Object o = provider.readFrom((Class)ManyTags.class, ManyTags.class,
+        Object o = provider.readFrom(ManyTags.class, ManyTags.class,
                       new Annotation[0], MediaType.APPLICATION_JSON_TYPE, 
                       new MetadataMap<String, String>(), is);
         ManyTags holder = (ManyTags)o;
@@ -770,12 +760,11 @@ public class JSONProviderTest extends As
         readAppendElementsNoNs(data, Collections.singletonMap("list", "tags"));
     }
     
-    @SuppressWarnings("unchecked")
     private void readAppendElementsNoNs(String data, Map<String, String> appendMap) throws Exception {
-        JSONProvider provider = new JSONProvider();
+        JSONProvider<ManyTags> provider = new JSONProvider<ManyTags>();
         provider.setInAppendElements(appendMap);
         ByteArrayInputStream is = new ByteArrayInputStream(data.getBytes());
-        Object o = provider.readFrom((Class)ManyTags.class, ManyTags.class,
+        Object o = provider.readFrom(ManyTags.class, ManyTags.class,
                       new Annotation[0], MediaType.APPLICATION_JSON_TYPE, 
                       new MetadataMap<String, String>(), is);
         ManyTags holder = (ManyTags)o;
@@ -809,9 +798,8 @@ public class JSONProviderTest extends As
         readTagVOAfterTransform(data, "{http://bar}thetag2");
     }
     
-    @SuppressWarnings("unchecked")
     private void readTagVO2AfterTransform(String data, String keyValue) throws Exception {
-        JSONProvider provider = new JSONProvider();
+        JSONProvider<TagVO2> provider = new JSONProvider<TagVO2>();
         Map<String, String> map = new HashMap<String, String>();
         map.put(keyValue, "{http://tags}thetag");
         Map<String, String> nsmap = new HashMap<String, String>();
@@ -819,7 +807,7 @@ public class JSONProviderTest extends As
         provider.setNamespaceMap(nsmap);
         provider.setInTransformElements(map);
         ByteArrayInputStream is = new ByteArrayInputStream(data.getBytes());
-        Object o = provider.readFrom((Class)TagVO2.class, TagVO2.class,
+        Object o = provider.readFrom(TagVO2.class, TagVO2.class,
                       new Annotation[0], MediaType.APPLICATION_JSON_TYPE, new MetadataMap<String, String>(),
                       is);
         TagVO2 tag2 = (TagVO2)o;
@@ -827,17 +815,16 @@ public class JSONProviderTest extends As
         assertEquals("B", tag2.getGroup());    
     }
     
-    @SuppressWarnings("unchecked")
     @Test
     public void testInNsElementsFromLocals() throws Exception {
         String data = "{tagholder:{thetag:{\"group\":\"B\",\"name\":\"A\"}}}";
-        JSONProvider provider = new JSONProvider();
+        JSONProvider<TagVO2Holder> provider = new JSONProvider<TagVO2Holder>();
         Map<String, String> map = new HashMap<String, String>();
         map.put("tagholder", "{http://tags}tagholder");
         map.put("thetag", "{http://tags}thetag");
         provider.setInTransformElements(map);
         ByteArrayInputStream is = new ByteArrayInputStream(data.getBytes());
-        Object o = provider.readFrom((Class)TagVO2Holder.class, TagVO2Holder.class,
+        Object o = provider.readFrom(TagVO2Holder.class, TagVO2Holder.class,
                       new Annotation[0], MediaType.TEXT_XML_TYPE, new MetadataMap<String, String>(), is);
         TagVO2Holder holder = (TagVO2Holder)o;
         TagVO2 tag2 = holder.getTagValue();
@@ -847,7 +834,7 @@ public class JSONProviderTest extends As
     
     @Test
     public void testOutAttributesAsElements() throws Exception {
-        JSONProvider provider = new JSONProvider();
+        JSONProvider<TagVO2Holder> provider = new JSONProvider<TagVO2Holder>();
         Map<String, String> map = new HashMap<String, String>();
         map.put("{http://tags}thetag", "thetag");
         map.put("{http://tags}tagholder", "tagholder");
@@ -869,7 +856,7 @@ public class JSONProviderTest extends As
     public void testOutAttributesAsElementsForList() throws Exception {
 
         //Provider
-        JSONProvider provider = new JSONProvider();
+        JSONProvider<List<?>> provider = new JSONProvider<List<?>>();
         provider.setCollectionWrapperName("tagholders");
         Map<String, String> map = new HashMap<String, String>();
         map.put("{http://tags}*", "*");
@@ -902,9 +889,8 @@ public class JSONProviderTest extends As
         assertEquals(expected, bos.toString());
     }
     
-    @SuppressWarnings("unchecked")
     private void readTagVOAfterTransform(String data, String keyValue) throws Exception {
-        JSONProvider provider = new JSONProvider();
+        JSONProvider<TagVO> provider = new JSONProvider<TagVO>();
         Map<String, String> map = new HashMap<String, String>();
         map.put(keyValue, "tagVO");
         provider.setInTransformElements(map);
@@ -912,7 +898,7 @@ public class JSONProviderTest extends As
         nsmap.put("http://bar", "t");
         provider.setNamespaceMap(nsmap);
         ByteArrayInputStream is = new ByteArrayInputStream(data.getBytes());
-        Object o = provider.readFrom((Class)TagVO.class, TagVO.class,
+        Object o = provider.readFrom(TagVO.class, TagVO.class,
                       new Annotation[0], MediaType.APPLICATION_JSON_TYPE, new MetadataMap<String, String>(),
                       is);
         TagVO tag2 = (TagVO)o;
@@ -925,7 +911,7 @@ public class JSONProviderTest extends As
     @Ignore
     // name:A is lost
     public void testDropElementsIgnored() throws Exception {
-        JSONProvider provider = new JSONProvider();
+        JSONProvider<ManyTags> provider = new JSONProvider<ManyTags>();
         List<String> list = new ArrayList<String>();
         list.add("ManyTags");
         list.add("list");
@@ -944,7 +930,7 @@ public class JSONProviderTest extends As
  
     @Test
     public void testDropElements() throws Exception {
-        JSONProvider provider = new JSONProvider();
+        JSONProvider<ManyTags> provider = new JSONProvider<ManyTags>();
         List<String> list = new ArrayList<String>();
         list.add("ManyTags");
         list.add("tags");
@@ -965,7 +951,7 @@ public class JSONProviderTest extends As
     
     @Test
     public void testDropQualifiedElements() throws Exception {
-        JSONProvider provider = new JSONProvider();
+        JSONProvider<TagVO2> provider = new JSONProvider<TagVO2>();
         List<String> list = new ArrayList<String>();
         list.add("{http://tags}thetag");
         provider.setOutDropElements(list);
@@ -982,7 +968,7 @@ public class JSONProviderTest extends As
     
     @Test
     public void testOutAppendNsElementBeforeLocal() throws Exception {
-        JSONProvider provider = new JSONProvider();
+        JSONProvider<TagVO> provider = new JSONProvider<TagVO>();
         Map<String, String> map = new HashMap<String, String>();
         map.put("tagVO", "{http://tagsvo2}t");
         provider.setOutAppendElements(map);
@@ -996,7 +982,7 @@ public class JSONProviderTest extends As
     
     @Test
     public void testOutAppendLocalBeforeLocal() throws Exception {
-        JSONProvider provider = new JSONProvider();
+        JSONProvider<TagVO> provider = new JSONProvider<TagVO>();
         Map<String, String> map = new HashMap<String, String>();
         map.put("tagVO", "supertag");
         provider.setOutAppendElements(map);
@@ -1010,7 +996,7 @@ public class JSONProviderTest extends As
     
     @Test
     public void testOutAppendElementsSameNs() throws Exception {
-        JSONProvider provider = new JSONProvider();
+        JSONProvider<TagVO2> provider = new JSONProvider<TagVO2>();
         Map<String, String> map = new HashMap<String, String>();
         map.put("{http://tags}thetag", "{http://tags}t");
         provider.setOutAppendElements(map);
@@ -1024,7 +1010,7 @@ public class JSONProviderTest extends As
     
     @Test
     public void testOutAppendElementsDiffNs() throws Exception {
-        JSONProvider provider = new JSONProvider();
+        JSONProvider<TagVO2> provider = new JSONProvider<TagVO2>();
         Map<String, String> map = new HashMap<String, String>();
         map.put("{http://tags}thetag", "{http://tagsvo2}t");
         provider.setOutAppendElements(map);
@@ -1038,7 +1024,7 @@ public class JSONProviderTest extends As
     
     @Test
     public void testOutElementsMapLocalNsToLocalNs() throws Exception {
-        JSONProvider provider = new JSONProvider();
+        JSONProvider<TagVO2> provider = new JSONProvider<TagVO2>();
         Map<String, String> map = new HashMap<String, String>();
         map.put("{http://tags}thetag", "{http://tagsvo2}t");
         provider.setOutTransformElements(map);
@@ -1053,7 +1039,7 @@ public class JSONProviderTest extends As
 
     @Test
     public void testOutElementsMapLocalNsToLocal() throws Exception {
-        JSONProvider provider = new JSONProvider();
+        JSONProvider<TagVO2> provider = new JSONProvider<TagVO2>();
         Map<String, String> map = new HashMap<String, String>();
         map.put("{http://tags}thetag", "t");
         provider.setOutTransformElements(map);
@@ -1067,7 +1053,7 @@ public class JSONProviderTest extends As
     
     @Test
     public void testOutElementsMapLocalToLocalNs() throws Exception {
-        JSONProvider provider = new JSONProvider();
+        JSONProvider<TagVO> provider = new JSONProvider<TagVO>();
         Map<String, String> namespaceMap = new HashMap<String, String>();
         namespaceMap.put("http://tags", "ns1");
         Map<String, String> map = new HashMap<String, String>();
@@ -1083,7 +1069,7 @@ public class JSONProviderTest extends As
     
     @Test
     public void testOutElementsMapLocalToLocal() throws Exception {
-        JSONProvider provider = new JSONProvider();
+        JSONProvider<TagVO> provider = new JSONProvider<TagVO>();
         Map<String, String> map = new HashMap<String, String>();
         map.put("tagVO", "supertag");
         map.put("group", "group2");

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/NoNamespaceJava5TypeCreator.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/NoNamespaceJava5TypeCreator.java?rev=1229332&r1=1229331&r2=1229332&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/NoNamespaceJava5TypeCreator.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/NoNamespaceJava5TypeCreator.java Mon Jan  9 20:07:20 2012
@@ -29,7 +29,7 @@ import org.apache.cxf.aegis.type.java5.J
 public class NoNamespaceJava5TypeCreator extends Java5TypeCreator {
 
     @Override
-    public QName createQName(Class typeClass) {
+    public QName createQName(Class<?> typeClass) {
         QName defName = super.createQName(typeClass);
         return new QName(defName.getLocalPart());
     }

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/NoNamespaceTypeCreator.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/NoNamespaceTypeCreator.java?rev=1229332&r1=1229331&r2=1229332&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/NoNamespaceTypeCreator.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/NoNamespaceTypeCreator.java Mon Jan  9 20:07:20 2012
@@ -29,7 +29,7 @@ import org.apache.cxf.aegis.type.Default
 public class NoNamespaceTypeCreator extends DefaultTypeCreator {
 
     @Override
-    protected QName createQName(Class javaType) {
+    protected QName createQName(Class<?> javaType) {
         // no namespace.
         QName defQname = super.createQName(javaType);
         return new QName(defQname.getLocalPart());

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/PrimitiveTextProviderTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/PrimitiveTextProviderTest.java?rev=1229332&r1=1229331&r2=1229332&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/PrimitiveTextProviderTest.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/PrimitiveTextProviderTest.java Mon Jan  9 20:07:20 2012
@@ -38,7 +38,7 @@ public class PrimitiveTextProviderTest e
     
     @Test
     public void testIsWriteable() {
-        MessageBodyWriter<Object> p = new PrimitiveTextProvider();
+        MessageBodyWriter<Object> p = new PrimitiveTextProvider<Object>();
         assertTrue(p.isWriteable(byte.class, null, null, null)
                    && p.isWriteable(Byte.class, null, null, null)
                    && p.isWriteable(boolean.class, null, null, null)
@@ -47,7 +47,7 @@ public class PrimitiveTextProviderTest e
     
     @Test
     public void testIsReadable() {
-        MessageBodyReader<Object> p = new PrimitiveTextProvider();
+        MessageBodyReader<Object> p = new PrimitiveTextProvider<Object>();
         assertTrue(p.isReadable(byte.class, null, null, null)
                    && p.isReadable(Byte.class, null, null, null)
                    && p.isReadable(boolean.class, null, null, null)
@@ -57,9 +57,10 @@ public class PrimitiveTextProviderTest e
     @SuppressWarnings("unchecked")
     @Test
     public void testReadByte() throws Exception {
-        MessageBodyReader p = new PrimitiveTextProvider();
+        MessageBodyReader<?> p = new PrimitiveTextProvider<Object>();
         
-        Byte valueRead = (Byte)p.readFrom(byte.class, 
+        @SuppressWarnings("rawtypes")
+        Byte valueRead = (Byte)p.readFrom((Class)byte.class, 
                                           null, 
                                           null, 
                                           null, 
@@ -69,7 +70,7 @@ public class PrimitiveTextProviderTest e
         
     }
     
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings({ "unchecked", "rawtypes" })
     @Test
     public void testReadBoolean() throws Exception {
         MessageBodyReader p = new PrimitiveTextProvider();
@@ -84,7 +85,7 @@ public class PrimitiveTextProviderTest e
         
     }
 
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings({ "unchecked", "rawtypes" })
     @Test
     public void testWriteBoolean() throws Exception {
         MessageBodyWriter p = new PrimitiveTextProvider();
@@ -100,10 +101,9 @@ public class PrimitiveTextProviderTest e
     }
     
     
-    @SuppressWarnings("unchecked")
     @Test
     public void testWriteStringISO() throws Exception {
-        MessageBodyWriter p = new PrimitiveTextProvider();
+        MessageBodyWriter<String> p = new PrimitiveTextProvider<String>();
         ByteArrayOutputStream os = new ByteArrayOutputStream();
         MultivaluedMap<String, Object> headers = new MetadataMap<String, Object>();
         
@@ -120,12 +120,11 @@ public class PrimitiveTextProviderTest e
         assertEquals(helloStringISO88591, os.toString("ISO-8859-1")); 
     }
     
-    @SuppressWarnings("unchecked")
     @Test
     public void testReadChineeseChars() throws Exception {
         String s = "中文";
         
-        MessageBodyReader p = new PrimitiveTextProvider();
+        MessageBodyReader<String> p = new PrimitiveTextProvider<String>();
         
         String value = (String)p.readFrom(String.class, null,
                 new Annotation[]{}, 

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/ProviderFactoryTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/ProviderFactoryTest.java?rev=1229332&r1=1229331&r2=1229332&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/ProviderFactoryTest.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/ProviderFactoryTest.java Mon Jan  9 20:07:20 2012
@@ -179,11 +179,11 @@ public class ProviderFactoryTest extends
     private void doTestDefaultJaxbProviderCloned(ProviderFactory pf, String property) {
         Message message = new MessageImpl();
         message.put(Message.QUERY_STRING, "uri=" + property);
-        MessageBodyReader customJaxbReader = pf.createMessageBodyReader((Class<?>)Book.class, null, null, 
+        MessageBodyReader<Book> customJaxbReader = pf.createMessageBodyReader(Book.class, null, null, 
                                                               MediaType.TEXT_XML_TYPE, message);
         assertTrue(customJaxbReader instanceof JAXBElementProvider);
         
-        JAXBElementProvider provider = (JAXBElementProvider)customJaxbReader;
+        JAXBElementProvider<Book> provider = (JAXBElementProvider<Book>)customJaxbReader;
         MessageContext mc = provider.getContext();
         assertNotNull(mc);
         UriInfo ui = mc.getUriInfo();
@@ -193,15 +193,15 @@ public class ProviderFactoryTest extends
         assertEquals(1, uriQuery.size());
         assertEquals(property, uriQuery.get(0));
         
-        MessageBodyReader customJaxbReader2 = pf.createMessageBodyReader((Class<?>)Book.class, null, null, 
+        MessageBodyReader<?> customJaxbReader2 = pf.createMessageBodyReader((Class<?>)Book.class, null, null, 
                                                               MediaType.TEXT_XML_TYPE, message);
         assertSame(customJaxbReader, customJaxbReader2);
          
-        MessageBodyWriter customJaxbWriter = pf.createMessageBodyWriter((Class<?>)Book.class, null, null, 
+        MessageBodyWriter<?> customJaxbWriter = pf.createMessageBodyWriter((Class<?>)Book.class, null, null, 
                                                               MediaType.TEXT_XML_TYPE, message);
         assertSame(customJaxbReader, customJaxbWriter);
         
-        MessageBodyReader jaxbReader = ProviderFactory.getSharedInstance().createMessageBodyReader(
+        MessageBodyReader<?> jaxbReader = ProviderFactory.getSharedInstance().createMessageBodyReader(
             (Class<?>)Book.class, null, null, MediaType.TEXT_XML_TYPE, message);
         assertTrue(jaxbReader instanceof JAXBElementProvider);
         assertNotSame(jaxbReader, customJaxbReader);
@@ -210,7 +210,7 @@ public class ProviderFactoryTest extends
     private void checkJaxbProvider(ProviderFactory pf) {
         int count = 0;
         for (Object provider : pf.getReadersWriters()) {
-            if (((ProviderInfo)provider).getProvider() instanceof JAXBElementProvider) {
+            if (((ProviderInfo<?>)provider).getProvider() instanceof JAXBElementProvider) {
                 count++;
             }
         }
@@ -220,13 +220,13 @@ public class ProviderFactoryTest extends
     @Test
     public void testCustomJaxbProvider() {
         ProviderFactory pf = ProviderFactory.getInstance();
-        JAXBElementProvider provider = new JAXBElementProvider();
+        JAXBElementProvider<Book> provider = new JAXBElementProvider<Book>();
         pf.registerUserProvider(provider);
-        MessageBodyReader customJaxbReader = pf.createMessageBodyReader((Class<?>)Book.class, null, null, 
+        MessageBodyReader<Book> customJaxbReader = pf.createMessageBodyReader(Book.class, null, null, 
                                                               MediaType.TEXT_XML_TYPE, new MessageImpl());
         assertSame(customJaxbReader, provider);
         
-        MessageBodyWriter customJaxbWriter = pf.createMessageBodyWriter((Class<?>)Book.class, null, null, 
+        MessageBodyWriter<Book> customJaxbWriter = pf.createMessageBodyWriter(Book.class, null, null, 
                                                               MediaType.TEXT_XML_TYPE, new MessageImpl());
         assertSame(customJaxbWriter, provider);
     }
@@ -234,13 +234,13 @@ public class ProviderFactoryTest extends
     @Test
     public void testCustomJsonProvider() {
         ProviderFactory pf = ProviderFactory.getInstance();
-        JSONProvider provider = new JSONProvider();
+        JSONProvider<Book> provider = new JSONProvider<Book>();
         pf.registerUserProvider(provider);
-        MessageBodyReader customJsonReader = pf.createMessageBodyReader((Class<?>)Book.class, null, null, 
+        MessageBodyReader<?> customJsonReader = pf.createMessageBodyReader(Book.class, null, null, 
                                                MediaType.APPLICATION_JSON_TYPE, new MessageImpl());
         assertSame(customJsonReader, provider);
         
-        MessageBodyWriter customJsonWriter = pf.createMessageBodyWriter((Class<?>)Book.class, null, null, 
+        MessageBodyWriter<?> customJsonWriter = pf.createMessageBodyWriter(Book.class, null, null, 
                                                MediaType.APPLICATION_JSON_TYPE, new MessageImpl());
         assertSame(customJsonWriter, provider);
     }
@@ -248,20 +248,20 @@ public class ProviderFactoryTest extends
     @Test
     public void testDefaultJsonProviderCloned() {
         ProviderFactory pf = ProviderFactory.getInstance();
-        MessageBodyReader customJsonReader = pf.createMessageBodyReader((Class<?>)Book.class, null, null, 
+        MessageBodyReader<?> customJsonReader = pf.createMessageBodyReader(Book.class, null, null, 
                                                 MediaType.APPLICATION_JSON_TYPE, new MessageImpl());
         assertTrue(customJsonReader instanceof JSONProvider);
         
-        MessageBodyReader customJsonReader2 = pf.createMessageBodyReader((Class<?>)Book.class, null, null, 
+        MessageBodyReader<?> customJsonReader2 = pf.createMessageBodyReader(Book.class, null, null, 
                                                 MediaType.APPLICATION_JSON_TYPE, new MessageImpl());
         assertSame(customJsonReader, customJsonReader2);
         
-        MessageBodyWriter customJsonWriter = pf.createMessageBodyWriter((Class<?>)Book.class, null, null, 
+        MessageBodyWriter<?> customJsonWriter = pf.createMessageBodyWriter(Book.class, null, null, 
                                                 MediaType.APPLICATION_JSON_TYPE, new MessageImpl());
         assertSame(customJsonReader, customJsonWriter);
         
-        MessageBodyReader jsonReader = ProviderFactory.getSharedInstance().createMessageBodyReader(
-            (Class<?>)Book.class, null, null, MediaType.APPLICATION_JSON_TYPE, new MessageImpl());
+        MessageBodyReader<?> jsonReader = ProviderFactory.getSharedInstance().createMessageBodyReader(
+            Book.class, null, null, MediaType.APPLICATION_JSON_TYPE, new MessageImpl());
         assertTrue(jsonReader instanceof JSONProvider);
         assertNotSame(jsonReader, customJsonReader);
     }
@@ -269,13 +269,13 @@ public class ProviderFactoryTest extends
     @Test
     public void testDataSourceReader() {
         ProviderFactory pf = ProviderFactory.getInstance();
-        pf.registerUserProvider(new DataSourceProvider());
-        MessageBodyReader reader = pf.createMessageBodyReader(
-              (Class<?>)DataSource.class, null, null, 
+        pf.registerUserProvider(new DataSourceProvider<Object>());
+        MessageBodyReader<DataSource> reader = pf.createMessageBodyReader(
+              DataSource.class, null, null, 
               MediaType.valueOf("image/png"), new MessageImpl());
         assertTrue(reader instanceof DataSourceProvider);
-        MessageBodyReader reader2 = pf.createMessageBodyReader(
-                          (Class<?>)DataHandler.class, null, null, 
+        MessageBodyReader<DataHandler> reader2 = pf.createMessageBodyReader(
+                          DataHandler.class, null, null, 
                           MediaType.valueOf("image/png"), new MessageImpl());
         assertSame(reader, reader2);
     }
@@ -283,13 +283,13 @@ public class ProviderFactoryTest extends
     @Test
     public void testDataSourceWriter() {
         ProviderFactory pf = ProviderFactory.getInstance();
-        pf.registerUserProvider(new DataSourceProvider());
-        MessageBodyWriter writer = pf.createMessageBodyWriter(
-              (Class<?>)DataSource.class, null, null, 
+        pf.registerUserProvider(new DataSourceProvider<Object>());
+        MessageBodyWriter<DataSource> writer = pf.createMessageBodyWriter(
+              DataSource.class, null, null, 
               MediaType.valueOf("image/png"), new MessageImpl());
         assertTrue(writer instanceof DataSourceProvider);
-        MessageBodyWriter writer2 = pf.createMessageBodyWriter(
-                          (Class<?>)DataHandler.class, null, null, 
+        MessageBodyWriter<DataHandler> writer2 = pf.createMessageBodyWriter(
+                          DataHandler.class, null, null, 
                           MediaType.valueOf("image/png"), new MessageImpl());
         assertSame(writer, writer2);
     }
@@ -297,9 +297,9 @@ public class ProviderFactoryTest extends
     @Test
     public void testNoDataSourceWriter() {
         ProviderFactory pf = ProviderFactory.getInstance();
-        pf.registerUserProvider(new DataSourceProvider());
-        MessageBodyWriter writer = pf.createMessageBodyWriter(
-              (Class<?>)DataSource.class, null, null, 
+        pf.registerUserProvider(new DataSourceProvider<Object>());
+        MessageBodyWriter<DataSource> writer = pf.createMessageBodyWriter(
+              DataSource.class, null, null, 
               MediaType.valueOf("multipart/form-data"), new MessageImpl());
         assertFalse(writer instanceof DataSourceProvider);
     }
@@ -309,26 +309,26 @@ public class ProviderFactoryTest extends
     public void testSchemaLocations() {
         ProviderFactory pf = ProviderFactory.getInstance();
         pf.setSchemaLocations(Collections.singletonList("classpath:/test.xsd"));
-        MessageBodyReader customJaxbReader = pf.createMessageBodyReader((Class<?>)Book.class, null, null, 
+        MessageBodyReader<Book> customJaxbReader = pf.createMessageBodyReader(Book.class, null, null, 
                                                               MediaType.TEXT_XML_TYPE, new MessageImpl());
         assertTrue(customJaxbReader instanceof JAXBElementProvider);
-        MessageBodyReader jaxbReader = ProviderFactory.getSharedInstance().createMessageBodyReader(
-            (Class<?>)Book.class, null, null, MediaType.TEXT_XML_TYPE, new MessageImpl());
+        MessageBodyReader<Book> jaxbReader = ProviderFactory.getSharedInstance().createMessageBodyReader(
+            Book.class, null, null, MediaType.TEXT_XML_TYPE, new MessageImpl());
         assertTrue(jaxbReader instanceof JAXBElementProvider);
         assertNotSame(jaxbReader, customJaxbReader);
         
-        assertNull(((JAXBElementProvider)jaxbReader).getSchema());
-        assertNotNull(((JAXBElementProvider)customJaxbReader).getSchema());
+        assertNull(((JAXBElementProvider<Book>)jaxbReader).getSchema());
+        assertNotNull(((JAXBElementProvider<Book>)customJaxbReader).getSchema());
         
-        MessageBodyReader customJsonReader = pf.createMessageBodyReader((Class<?>)Book.class, null, null, 
+        MessageBodyReader<Book> customJsonReader = pf.createMessageBodyReader(Book.class, null, null, 
                                                  MediaType.APPLICATION_JSON_TYPE, new MessageImpl());
         assertTrue(customJsonReader instanceof JSONProvider);
-        MessageBodyReader jsonReader = ProviderFactory.getSharedInstance().createMessageBodyReader(
-            (Class<?>)Book.class, null, null, MediaType.APPLICATION_JSON_TYPE, new MessageImpl());
+        MessageBodyReader<Book> jsonReader = ProviderFactory.getSharedInstance().createMessageBodyReader(
+            Book.class, null, null, MediaType.APPLICATION_JSON_TYPE, new MessageImpl());
         assertTrue(jsonReader instanceof JSONProvider);
         assertNotSame(jsonReader, customJsonReader);
-        assertNull(((JSONProvider)jsonReader).getSchema());
-        assertNotNull(((JSONProvider)customJsonReader).getSchema());
+        assertNull(((JSONProvider<Book>)jsonReader).getSchema());
+        assertNotNull(((JSONProvider<Book>)customJsonReader).getSchema());
     }
     
     @Test
@@ -426,7 +426,7 @@ public class ProviderFactoryTest extends
     public void testMessageBodyWriterNoTypes() throws Exception {
         ProviderFactory pf = ProviderFactory.getInstance();
         List<Object> providers = new ArrayList<Object>();
-        SuperBookReaderWriter2 superBookHandler = new SuperBookReaderWriter2();
+        SuperBookReaderWriter2<SuperBook> superBookHandler = new SuperBookReaderWriter2<SuperBook>();
         providers.add(superBookHandler);
         pf.setUserProviders(providers);
         assertSame(superBookHandler, 
@@ -441,14 +441,14 @@ public class ProviderFactoryTest extends
     public void testSortEntityProviders() throws Exception {
         ProviderFactory pf = ProviderFactory.getInstance();
         pf.registerUserProvider(new TestStringProvider());
-        pf.registerUserProvider(new PrimitiveTextProvider());
+        pf.registerUserProvider(new PrimitiveTextProvider<Object>());
         
-        List<ProviderInfo<MessageBodyReader>> readers = pf.getMessageReaders();
+        List<ProviderInfo<MessageBodyReader<?>>> readers = pf.getMessageReaders();
 
         assertTrue(indexOf(readers, TestStringProvider.class) 
                    < indexOf(readers, PrimitiveTextProvider.class));
         
-        List<ProviderInfo<MessageBodyWriter>> writers = pf.getMessageWriters();
+        List<ProviderInfo<MessageBodyWriter<?>>> writers = pf.getMessageWriters();
 
         assertTrue(indexOf(writers, TestStringProvider.class) 
                    < indexOf(writers, PrimitiveTextProvider.class));
@@ -458,29 +458,29 @@ public class ProviderFactoryTest extends
     @Test
     public void testParameterHandlerProvider() throws Exception {
         ProviderFactory pf = ProviderFactory.getInstance();
-        ParameterHandler h = new CustomerParameterHandler();
+        ParameterHandler<Customer> h = new CustomerParameterHandler();
         pf.registerUserProvider(h);
-        ParameterHandler h2 = pf.createParameterHandler(Customer.class);
+        ParameterHandler<Customer> h2 = pf.createParameterHandler(Customer.class);
         assertSame(h2, h);
     }
     
     @Test
     public void testSortEntityProvidersWithConfig() throws Exception {
         ProviderFactory pf = ProviderFactory.getInstance();
-        JSONProvider json1 = new JSONProvider();
+        JSONProvider<?> json1 = new JSONProvider<Object>();
         json1.setConsumeMediaTypes(Collections.singletonList("application/json;q=0.9"));
         pf.registerUserProvider(json1);
-        JSONProvider json2 = new JSONProvider();
+        JSONProvider<?> json2 = new JSONProvider<Object>();
         json2.setConsumeMediaTypes(Collections.singletonList("application/json"));
         json2.setProduceMediaTypes(Collections.singletonList("application/sbc;q=0.9"));
         pf.registerUserProvider(json2);
         
-        List<ProviderInfo<MessageBodyReader>> readers = pf.getMessageReaders();
+        List<ProviderInfo<MessageBodyReader<?>>> readers = pf.getMessageReaders();
 
         assertTrue(indexOf(readers, json2) 
                    < indexOf(readers, json1));
         
-        List<ProviderInfo<MessageBodyWriter>> writers = pf.getMessageWriters();
+        List<ProviderInfo<MessageBodyWriter<?>>> writers = pf.getMessageWriters();
 
         assertTrue(indexOf(writers, json1) 
                    < indexOf(writers, json2));
@@ -496,7 +496,7 @@ public class ProviderFactoryTest extends
     public void testGetBinaryProvider() throws Exception {
         verifyProvider(byte[].class, BinaryDataProvider.class, "*/*");
         verifyProvider(InputStream.class, BinaryDataProvider.class, "image/png");
-        MessageBodyWriter writer = ProviderFactory.getInstance()
+        MessageBodyWriter<File> writer = ProviderFactory.getInstance()
             .createMessageBodyWriter(File.class, null, null, MediaType.APPLICATION_OCTET_STREAM_TYPE, 
                                      new MessageImpl());
         assertTrue(BinaryDataProvider.class == writer.getClass());
@@ -511,10 +511,10 @@ public class ProviderFactoryTest extends
         
         MediaType mType = MediaType.valueOf(mediaType);
         
-        MessageBodyReader reader = pf.createMessageBodyReader(type, type, null, mType, new MessageImpl());
+        MessageBodyReader<?> reader = pf.createMessageBodyReader(type, type, null, mType, new MessageImpl());
         assertSame("Unexpected provider found", provider, reader.getClass());
     
-        MessageBodyWriter writer = pf.createMessageBodyWriter(type, type, null, mType, new MessageImpl());
+        MessageBodyWriter<?> writer = pf.createMessageBodyWriter(type, type, null, mType, new MessageImpl());
         assertTrue("Unexpected provider found", provider == writer.getClass());
     }
     
@@ -581,10 +581,10 @@ public class ProviderFactoryTest extends
                        "application/widget");
     }
     
-    private int indexOf(List<? extends Object> providerInfos, Class providerType) {
+    private int indexOf(List<? extends Object> providerInfos, Class<?> providerType) {
         int index = 0;
         for (Object pi : providerInfos) {
-            Object p = ((ProviderInfo)pi).getProvider();
+            Object p = ((ProviderInfo<?>)pi).getProvider();
             if (p.getClass().isAssignableFrom(providerType)) {
                 break;
             }
@@ -596,7 +596,7 @@ public class ProviderFactoryTest extends
     private int indexOf(List<? extends Object> providerInfos, Object provider) {
         int index = 0;
         for (Object pi : providerInfos) {
-            if (((ProviderInfo)pi).getProvider() == provider) {
+            if (((ProviderInfo<?>)pi).getProvider() == provider) {
                 break;
             }
             index++;
@@ -714,7 +714,7 @@ public class ProviderFactoryTest extends
     
     @Test
     public void testSetSchemasFromClasspath() {
-        JAXBElementProvider provider = new JAXBElementProvider();
+        JAXBElementProvider<?> provider = new JAXBElementProvider<Object>();
         ProviderFactory pf = ProviderFactory.getInstance();
         pf.registerUserProvider(provider);
         
@@ -809,37 +809,38 @@ public class ProviderFactoryTest extends
     
     @Produces("application/xml")
     @Consumes("application/xml")
-    private static class SuperBookReaderWriter2 implements MessageBodyReader, MessageBodyWriter {
+    private static class SuperBookReaderWriter2<T> 
+        implements MessageBodyReader<T>, MessageBodyWriter<T> {
 
-        public boolean isReadable(Class type, Type genericType, Annotation[] annotations, 
+        public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, 
                                   MediaType mediaType) {
             return true;
         }
 
-        public Object readFrom(Class arg0, Type arg1, Annotation[] arg2, MediaType arg3, 
-                                  MultivaluedMap arg4, InputStream arg5) 
+        public T readFrom(Class<T> arg0, Type arg1, Annotation[] arg2, MediaType arg3, 
+                          MultivaluedMap<String, String> arg4, InputStream arg5) 
             throws IOException, WebApplicationException {
             // TODO Auto-generated method stub
             return null;
         }
 
-        public long getSize(Object t, Class type, Type genericType, 
+        public long getSize(T t, Class<?> type, Type genericType, 
                             Annotation[] annotations, MediaType mediaType) {
             // TODO Auto-generated method stub
             return 0;
         }
 
-        public boolean isWriteable(Class type, Type genericType, 
+        public boolean isWriteable(Class<?> type, Type genericType, 
                                    Annotation[] annotations, MediaType mediaType) {
             return true;
         }
 
         
-        public void writeTo(Object arg0, Class arg1, Type arg2, 
-                            Annotation[] arg3, MediaType arg4, MultivaluedMap arg5, 
-                            OutputStream arg6) throws IOException, WebApplicationException {
+        public void writeTo(T t, Class<?> type, Type genericType, Annotation[] annotations,
+                            MediaType mediaType, MultivaluedMap<String, Object> httpHeaders,
+                            OutputStream entityStream)
+            throws IOException, WebApplicationException {
             // TODO Auto-generated method stub
-            
         }
         
     }

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/SourceProviderTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/SourceProviderTest.java?rev=1229332&r1=1229331&r2=1229332&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/SourceProviderTest.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/SourceProviderTest.java Mon Jan  9 20:07:20 2012
@@ -58,7 +58,7 @@ public class SourceProviderTest extends 
        
     @Test
     public void testIsWriteable() {
-        SourceProvider p = new SourceProvider();
+        SourceProvider<Source> p = new SourceProvider<Source>();
         assertTrue(p.isWriteable(StreamSource.class, null, null, null)
                    && p.isWriteable(DOMSource.class, null, null, null)
                    && p.isWriteable(Source.class, null, null, null));
@@ -66,7 +66,7 @@ public class SourceProviderTest extends 
     
     @Test
     public void testIsReadable() {
-        SourceProvider p = new SourceProvider();
+        SourceProvider<Source> p = new SourceProvider<Source>();
         assertTrue(p.isReadable(StreamSource.class, null, null, null)
                    && p.isReadable(DOMSource.class, null, null, null)
                    && p.isReadable(Source.class, null, null, null));
@@ -74,7 +74,7 @@ public class SourceProviderTest extends 
 
     @Test
     public void testReadFrom() throws Exception {
-        SourceProvider p = new TestSourceProvider();
+        SourceProvider<Object> p = new TestSourceProvider<Object>();
         assertSame(StreamSource.class, verifyRead(p, StreamSource.class).getClass());
         assertSame(StreamSource.class, verifyRead(p, Source.class).getClass());
         assertSame(StaxSource.class, verifyRead(p, SAXSource.class).getClass());
@@ -83,10 +83,9 @@ public class SourceProviderTest extends 
         assertTrue(Document.class.isAssignableFrom(verifyRead(p, Document.class).getClass()));
     }
     
-    @SuppressWarnings("unchecked")
     @Test
     public void testReadFromStreamReader() throws Exception {
-        TestSourceProvider p = new TestSourceProvider();
+        TestSourceProvider<Source> p = new TestSourceProvider<Source>();
         
         InputStream is = new ByteArrayInputStream("<test xmlns=\"http://bar\"/>".getBytes());
         XMLStreamReader reader = StaxUtils.createXMLStreamReader(is);
@@ -99,7 +98,7 @@ public class SourceProviderTest extends 
         
         p.getMessage().setContent(XMLStreamReader.class, reader);
         
-        Source source = (Source)p.readFrom((Class)Source.class,
+        Source source = p.readFrom(Source.class,
                    null, null, null, null, is);
         ByteArrayOutputStream bos = new ByteArrayOutputStream(); 
         TransformerFactory.newInstance().newTransformer()
@@ -109,7 +108,7 @@ public class SourceProviderTest extends 
     
     @Test
     public void testWriteToDocument() throws Exception {
-        SourceProvider p = new SourceProvider();
+        SourceProvider<Document> p = new SourceProvider<Document>();
         
         Document doc = DOMUtils.readXml(new StringReader("<test/>"));
         
@@ -125,14 +124,14 @@ public class SourceProviderTest extends 
     
     @Test
     public void testReadFromWithPreferredFormat() throws Exception {
-        TestSourceProvider p = new TestSourceProvider();
+        TestSourceProvider<Source> p = new TestSourceProvider<Source>();
         p.getMessage().put("source-preferred-format", "sax");        
         assertSame(StaxSource.class, verifyRead(p, Source.class).getClass());
     }
     
     @Test
     public void testWriteTo() throws Exception {
-        SourceProvider p = new TestSourceProvider();
+        SourceProvider<Source> p = new TestSourceProvider<Source>();
         StreamSource s = new StreamSource(new ByteArrayInputStream("<test/>".getBytes()));
         ByteArrayOutputStream os = new ByteArrayOutputStream();
         p.writeTo(s, null, null, null, MediaType.APPLICATION_XML_TYPE, 
@@ -144,9 +143,10 @@ public class SourceProviderTest extends 
         assertTrue(os.toString().contains("<test/>"));
     }
     
-    @SuppressWarnings("unchecked")
-    private <T> T verifyRead(MessageBodyReader p, Class<T> type) throws Exception {
-        return (T)p.readFrom(type,
+    private <T> T verifyRead(MessageBodyReader<T> p, Class<?> type) throws Exception {
+        @SuppressWarnings("unchecked")
+        Class<T> cls = (Class<T>)type;
+        return (T)p.readFrom(cls,
                    null, null, null, null,
                    new ByteArrayInputStream("<test/>".getBytes()));
     }
@@ -158,7 +158,7 @@ public class SourceProviderTest extends 
         return new DOMSource(builder.parse(new ByteArrayInputStream("<test/>".getBytes())));
     }
     
-    private static class TestSourceProvider extends SourceProvider {
+    private static class TestSourceProvider<T> extends SourceProvider<T> {
         
         private Message m = new MessageImpl();
         

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/XPathProviderTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/XPathProviderTest.java?rev=1229332&r1=1229331&r2=1229332&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/XPathProviderTest.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/XPathProviderTest.java Mon Jan  9 20:07:20 2012
@@ -32,7 +32,7 @@ public class XPathProviderTest extends A
 
     @Test
     public void testIsReadableClassName() {
-        XPathProvider provider = new XPathProvider();
+        XPathProvider<?> provider = new XPathProvider<Object>();
         provider.setExpression("/");
         assertTrue(provider.isReadable(Book.class, null, null, null));
         assertTrue(provider.isReadable(BookStore.class, null, null, null));
@@ -46,7 +46,7 @@ public class XPathProviderTest extends A
     
     @Test
     public void testIsReadableClassNames() {
-        XPathProvider provider = new XPathProvider();
+        XPathProvider<?> provider = new XPathProvider<Object>();
         assertFalse(provider.isReadable(Book.class, null, null, null));
         assertFalse(provider.isReadable(BookStore.class, null, null, null));
         Map<String, String> map = new HashMap<String, String>();
@@ -56,14 +56,13 @@ public class XPathProviderTest extends A
         assertTrue(provider.isReadable(Book.class, null, null, null));
     }
     
-    @SuppressWarnings("unchecked")
     @Test
     public void testReadFrom() throws Exception {
         String value = "<Book><name>The Book</name><id>2</id></Book>";
-        XPathProvider provider = new XPathProvider();
+        XPathProvider<Book> provider = new XPathProvider<Book>();
         provider.setExpression("/Book");
         provider.setClassName(Book.class.getName());
-        Book book = (Book)provider.readFrom((Class)Book.class, null, null, null, null,
+        Book book = (Book)provider.readFrom(Book.class, null, null, null, null,
                           new ByteArrayInputStream(value.getBytes()));
         assertNotNull(book);
         assertEquals(2L, book.getId());

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/XSLTJaxbProviderTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/XSLTJaxbProviderTest.java?rev=1229332&r1=1229331&r2=1229332&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/XSLTJaxbProviderTest.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/XSLTJaxbProviderTest.java Mon Jan  9 20:07:20 2012
@@ -47,14 +47,14 @@ public class XSLTJaxbProviderTest extend
     
     @Test
     public void testIsWriteable() throws Exception {
-        XSLTJaxbProvider provider = new XSLTJaxbProvider();
+        XSLTJaxbProvider<Book> provider = new XSLTJaxbProvider<Book>();
         provider.setOutTemplate(TEMPLATE_LOCATION);
         provider.isWriteable(Book.class, Book.class, null, MediaType.APPLICATION_XML_TYPE);
     }
     
     @Test
     public void testIsWriteableWithSetClasses() throws Exception {
-        XSLTJaxbProvider provider = new XSLTJaxbProvider();
+        XSLTJaxbProvider<Book> provider = new XSLTJaxbProvider<Book>();
         provider.setOutTemplate(TEMPLATE_LOCATION);
         List<String> names = new ArrayList<String>();
         names.add(Book.class.getName());
@@ -64,7 +64,7 @@ public class XSLTJaxbProviderTest extend
     
     @Test
     public void testNotWriteableWithSetClasses() throws Exception {
-        XSLTJaxbProvider provider = new XSLTJaxbProvider();
+        XSLTJaxbProvider<SuperBook> provider = new XSLTJaxbProvider<SuperBook>();
         provider.setOutTemplate(TEMPLATE_LOCATION);
         List<String> names = new ArrayList<String>();
         names.add(Book.class.getName());
@@ -74,7 +74,7 @@ public class XSLTJaxbProviderTest extend
     
     @Test
     public void testIsWriteableWithSetClassesAndJaxbOnly() throws Exception {
-        XSLTJaxbProvider provider = new XSLTJaxbProvider();
+        XSLTJaxbProvider<SuperBook> provider = new XSLTJaxbProvider<SuperBook>();
         provider.setSupportJaxbOnly(true);
         provider.setOutTemplate(TEMPLATE_LOCATION);
         List<String> names = new ArrayList<String>();
@@ -85,7 +85,7 @@ public class XSLTJaxbProviderTest extend
     
     @Test
     public void testWrite() throws Exception {
-        XSLTJaxbProvider provider = new XSLTJaxbProvider();
+        XSLTJaxbProvider<Book> provider = new XSLTJaxbProvider<Book>();
         provider.setOutTemplate(TEMPLATE_LOCATION);
         
         Book b = new Book();
@@ -102,7 +102,7 @@ public class XSLTJaxbProviderTest extend
     
     @Test
     public void testWriteToStreamWriter() throws Exception {
-        XSLTJaxbProvider provider = new XSLTJaxbProvider() {
+        XSLTJaxbProvider<Book> provider = new XSLTJaxbProvider<Book>() {
             @Override
             protected XMLStreamWriter getStreamWriter(Object obj, OutputStream os, MediaType mt) {
                 return StaxUtils.createXMLStreamWriter(os);
@@ -124,7 +124,7 @@ public class XSLTJaxbProviderTest extend
     
     @Test
     public void testWriteWithoutTemplate() throws Exception {
-        XSLTJaxbProvider provider = new XSLTJaxbProvider();
+        XSLTJaxbProvider<Book> provider = new XSLTJaxbProvider<Book>();
         provider.setSupportJaxbOnly(true);
         
         Book b = new Book();
@@ -140,14 +140,14 @@ public class XSLTJaxbProviderTest extend
     
     @Test
     public void testIsReadable() throws Exception {
-        XSLTJaxbProvider provider = new XSLTJaxbProvider();
+        XSLTJaxbProvider<Book> provider = new XSLTJaxbProvider<Book>();
         provider.setInTemplate(TEMPLATE_LOCATION);
         provider.isReadable(Book.class, Book.class, null, MediaType.APPLICATION_XML_TYPE);
     }
     
     @Test
     public void testIsReadableWithSetClasses() throws Exception {
-        XSLTJaxbProvider provider = new XSLTJaxbProvider();
+        XSLTJaxbProvider<Book> provider = new XSLTJaxbProvider<Book>();
         provider.setInTemplate(TEMPLATE_LOCATION);
         List<String> names = new ArrayList<String>();
         names.add(Book.class.getName());
@@ -157,7 +157,7 @@ public class XSLTJaxbProviderTest extend
     
     @Test
     public void testNotReadableWithSetClasses() throws Exception {
-        XSLTJaxbProvider provider = new XSLTJaxbProvider();
+        XSLTJaxbProvider<SuperBook> provider = new XSLTJaxbProvider<SuperBook>();
         provider.setInTemplate(TEMPLATE_LOCATION);
         List<String> names = new ArrayList<String>();
         names.add(Book.class.getName());
@@ -167,7 +167,7 @@ public class XSLTJaxbProviderTest extend
     
     @Test
     public void testIsReadableWithSetClassesAndJaxbOnly() throws Exception {
-        XSLTJaxbProvider provider = new XSLTJaxbProvider();
+        XSLTJaxbProvider<SuperBook> provider = new XSLTJaxbProvider<SuperBook>();
         provider.setSupportJaxbOnly(true);
         provider.setInTemplate(TEMPLATE_LOCATION);
         List<String> names = new ArrayList<String>();
@@ -176,26 +176,24 @@ public class XSLTJaxbProviderTest extend
         provider.isReadable(SuperBook.class, SuperBook.class, null, MediaType.APPLICATION_XML_TYPE);
     }
     
-    @SuppressWarnings("unchecked")
     @Test
     public void testRead() throws Exception {
-        XSLTJaxbProvider provider = new XSLTJaxbProvider();
+        XSLTJaxbProvider<Book> provider = new XSLTJaxbProvider<Book>();
         provider.setInTemplate(TEMPLATE_LOCATION);
         
         Book b = new Book();
         b.setId(123L);
         b.setName("TheBook");
-        Book b2 = (Book)provider.readFrom((Class)Book.class, Book.class, b.getClass().getAnnotations(),
+        Book b2 = provider.readFrom(Book.class, Book.class, b.getClass().getAnnotations(),
                           MediaType.TEXT_XML_TYPE, new MetadataMap<String, String>(),
                           new ByteArrayInputStream(BOOK_XML.getBytes()));
         b.setName("TheBook2");
         assertEquals("Transformation is bad", b, b2);
     }
     
-    @SuppressWarnings("unchecked")
     @Test
     public void testReadFromStreamReader() throws Exception {
-        XSLTJaxbProvider provider = new XSLTJaxbProvider() {
+        XSLTJaxbProvider<Book> provider = new XSLTJaxbProvider<Book>() {
             @Override
             protected XMLStreamReader getStreamReader(InputStream is, Class<?> type, MediaType mt) {
                 return StaxUtils.createXMLStreamReader(is);
@@ -206,23 +204,22 @@ public class XSLTJaxbProviderTest extend
         Book b = new Book();
         b.setId(123L);
         b.setName("TheBook");
-        Book b2 = (Book)provider.readFrom((Class)Book.class, Book.class, b.getClass().getAnnotations(),
+        Book b2 = provider.readFrom(Book.class, Book.class, b.getClass().getAnnotations(),
                           MediaType.TEXT_XML_TYPE, new MetadataMap<String, String>(),
                           new ByteArrayInputStream(BOOK_XML.getBytes()));
         b.setName("TheBook2");
         assertEquals("Transformation is bad", b, b2);
     }
     
-    @SuppressWarnings("unchecked")
     @Test
     public void testReadWithoutTemplate() throws Exception {
-        XSLTJaxbProvider provider = new XSLTJaxbProvider();
+        XSLTJaxbProvider<Book> provider = new XSLTJaxbProvider<Book>();
         provider.setSupportJaxbOnly(true);
         
         Book b = new Book();
         b.setId(123L);
         b.setName("TheBook");
-        Book b2 = (Book)provider.readFrom((Class)Book.class, Book.class, b.getClass().getAnnotations(),
+        Book b2 = provider.readFrom(Book.class, Book.class, b.getClass().getAnnotations(),
                           MediaType.TEXT_XML_TYPE, new MetadataMap<String, String>(),
                           new ByteArrayInputStream(BOOK_XML.getBytes()));
         assertEquals("Transformation is bad", b, b2);

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/resources/sdo/Structure.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/resources/sdo/Structure.java?rev=1229332&r1=1229331&r2=1229332&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/resources/sdo/Structure.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/resources/sdo/Structure.java Mon Jan  9 20:07:20 2012
@@ -53,6 +53,7 @@ public interface Structure extends Seria
     void setDbl(double value);
     void unsetDbl();
     boolean isSetDbl();
+    @SuppressWarnings("rawtypes")
     List getTexts();
 }
 

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/resources/sdo/impl/StructureImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/resources/sdo/impl/StructureImpl.java?rev=1229332&r1=1229331&r2=1229332&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/resources/sdo/impl/StructureImpl.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/resources/sdo/impl/StructureImpl.java Mon Jan  9 20:07:20 2012
@@ -28,6 +28,7 @@ import org.apache.tuscany.sdo.impl.DataO
 import commonj.sdo.Type;
 
 //CHECKSTYLE:OFF
+@SuppressWarnings("rawtypes")
 public class StructureImpl extends DataObjectBase implements Structure {
 
     public static final int TEXT = 0;

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/spring/JAXRSServerFactoryBeanTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/spring/JAXRSServerFactoryBeanTest.java?rev=1229332&r1=1229331&r2=1229332&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/spring/JAXRSServerFactoryBeanTest.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/spring/JAXRSServerFactoryBeanTest.java Mon Jan  9 20:07:20 2012
@@ -80,10 +80,10 @@ public class JAXRSServerFactoryBeanTest 
     }
     
     private void verifyJaxbProvider(List<?> providers) throws Exception {
-        JAXBElementProvider provider = null;
+        JAXBElementProvider<?> provider = null;
         for (Object o : providers) {
             if (o instanceof JAXBElementProvider) {
-                provider = (JAXBElementProvider)o;
+                provider = (JAXBElementProvider<?>)o;
                 
             }
         }

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/JAXRSUtilsTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/JAXRSUtilsTest.java?rev=1229332&r1=1229331&r2=1229332&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/JAXRSUtilsTest.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/JAXRSUtilsTest.java Mon Jan  9 20:07:20 2012
@@ -168,7 +168,8 @@ public class JAXRSUtilsTest extends Asse
         Server server = sf.create();  
         assertSame(app, customer.getApplication1());
         assertSame(app, customer.getApplication2());
-        ThreadLocalProxy proxy = (ThreadLocalProxy)app.getUriInfo();
+        @SuppressWarnings("unchecked")
+        ThreadLocalProxy<UriInfo> proxy = (ThreadLocalProxy<UriInfo>)app.getUriInfo();
         assertNotNull(proxy);
         invokeCustomerMethod(sf.getServiceFactory().getClassResourceInfo().get(0),
                              customer, server);
@@ -185,7 +186,8 @@ public class JAXRSUtilsTest extends Asse
         sf.setStart(false);
         Server server = sf.create();  
         
-        ThreadLocalProxy proxy = (ThreadLocalProxy)app.getUriInfo();
+        @SuppressWarnings("unchecked")
+        ThreadLocalProxy<UriInfo> proxy = (ThreadLocalProxy<UriInfo>)app.getUriInfo();
         assertNotNull(proxy);
         
         ClassResourceInfo cri = sf.getServiceFactory().getClassResourceInfo().get(0);
@@ -1305,7 +1307,7 @@ public class JAXRSUtilsTest extends Asse
         messageImpl.setContent(InputStream.class, new ByteArrayInputStream(body.getBytes()));
         
         ProviderFactory.getInstance(messageImpl).registerUserProvider(
-            new FormEncodingProvider() {
+            new FormEncodingProvider<Object>() {
                 @Override
                 protected void persistParamsOnMessage(MultivaluedMap<String, String> params) {
                     messageImpl.put(FormUtils.FORM_PARAM_MAP, params);    
@@ -1496,6 +1498,7 @@ public class JAXRSUtilsTest extends Asse
         
     }
     
+    @SuppressWarnings("unchecked")
     @Test
     public void testSingletonHttpContextFields() throws Exception {
         
@@ -1517,31 +1520,30 @@ public class JAXRSUtilsTest extends Asse
         InjectionUtils.injectContextMethods(c, cri, m);
         assertSame(ThreadLocalUriInfo.class, c.getUriInfo2().getClass());
         assertSame(UriInfoImpl.class, 
-                   ((ThreadLocalProxy)c.getUriInfo2()).get().getClass());
+                   ((ThreadLocalProxy<UriInfo>)c.getUriInfo2()).get().getClass());
         assertSame(HttpHeadersImpl.class, 
-                   ((ThreadLocalProxy)c.getHeaders()).get().getClass());
+                   ((ThreadLocalProxy<HttpHeaders>)c.getHeaders()).get().getClass());
         assertSame(RequestImpl.class, 
-                   ((ThreadLocalProxy)c.getRequest()).get().getClass());
+                   ((ThreadLocalProxy<Request>)c.getRequest()).get().getClass());
         assertSame(SecurityContextImpl.class, 
-                   ((ThreadLocalProxy)c.getSecurityContext()).get().getClass());
-        assertSame(ProvidersImpl.class, 
-                   ((ThreadLocalProxy)c.getBodyWorkers()).get().getClass());
+                   ((ThreadLocalProxy<SecurityContext>)c.getSecurityContext()).get().getClass());
         assertSame(ProvidersImpl.class, 
-                   ((ThreadLocalProxy)c.getBodyWorkers()).get().getClass());
+                   ((ThreadLocalProxy<Providers>)c.getBodyWorkers()).get().getClass());
   
         assertSame(servletContextMock, 
-                   ((ThreadLocalProxy)c.getThreadLocalServletContext()).get());
+                   ((ThreadLocalProxy<ServletContext>)c.getThreadLocalServletContext()).get());
         assertSame(servletContextMock, 
-                   ((ThreadLocalProxy)c.getServletContext()).get());
+                   ((ThreadLocalProxy<ServletContext>)c.getServletContext()).get());
         assertSame(servletContextMock, 
-                   ((ThreadLocalProxy)c.getSuperServletContext()).get());
+                   ((ThreadLocalProxy<ServletContext>)c.getSuperServletContext()).get());
         assertSame(httpRequest, 
-                   ((ThreadLocalProxy)c.getServletRequest()).get());
+                   ((ThreadLocalProxy<HttpServletRequest>)c.getServletRequest()).get());
         HttpServletResponseFilter filter = (
-            HttpServletResponseFilter)((ThreadLocalProxy)c.getServletResponse()).get();
+            HttpServletResponseFilter)((ThreadLocalProxy<HttpServletResponse>)c.getServletResponse()).get();
         assertSame(httpResponse, filter.getResponse());
     }
     
+    @SuppressWarnings("unchecked")
     @Test
     public void testSingletonHttpResourceFields() throws Exception {
         
@@ -1559,14 +1561,16 @@ public class JAXRSUtilsTest extends Asse
         InjectionUtils.injectContextProxies(cri, cri.getResourceProvider().getInstance(null));
         InjectionUtils.injectResourceFields(c, cri, m);
         assertSame(servletContextMock, 
-                   ((ThreadLocalProxy)c.getServletContextResource()).get());
+                   ((ThreadLocalProxy<ServletContext>)c.getServletContextResource()).get());
         assertSame(httpRequest, 
-                   ((ThreadLocalProxy)c.getServletRequestResource()).get());
+                   ((ThreadLocalProxy<HttpServletRequest>)c.getServletRequestResource()).get());
         HttpServletResponseFilter filter = (
-            HttpServletResponseFilter)((ThreadLocalProxy)c.getServletResponseResource()).get();
+            HttpServletResponseFilter)((ThreadLocalProxy<HttpServletResponse>)c.getServletResponseResource())
+                .get();
         assertSame(httpResponse, filter.getResponse());
     }
     
+    @SuppressWarnings("unchecked")
     @Test
     public void testContextAnnotationOnMethod() throws Exception {
         
@@ -1582,7 +1586,7 @@ public class JAXRSUtilsTest extends Asse
         assertNotNull(c.getUriInfo());
         assertSame(ThreadLocalUriInfo.class, c.getUriInfo().getClass());
         assertSame(UriInfoImpl.class, 
-                   ((ThreadLocalProxy)c.getUriInfo()).get().getClass());
+                   ((ThreadLocalProxy<UriInfo>)c.getUriInfo()).get().getClass());
         assertSame(ThreadLocalServletConfig.class, c.getSuperServletConfig().getClass());
         assertSame(ThreadLocalHttpServletRequest.class, c.getHttpServletRequest().getClass());
     }

Modified: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/bootstrapping/BootstrapStorage.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/bootstrapping/BootstrapStorage.java?rev=1229332&r1=1229331&r2=1229332&view=diff
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/bootstrapping/BootstrapStorage.java (original)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/bootstrapping/BootstrapStorage.java Mon Jan  9 20:07:20 2012
@@ -199,7 +199,7 @@ public class BootstrapStorage {
     }
 
     @Provider
-    public static class SettingsProvider extends JSONProvider {
+    public static class SettingsProvider extends JSONProvider<String> {
         private static final String LOGGING_NAMESPACE = "http://cxf.apache.org/log";
         private static final String SUBSCRIPTIONS_ARRAY = "subscriptions";
 

Modified: cxf/trunk/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SamlFormInHandler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SamlFormInHandler.java?rev=1229332&r1=1229331&r2=1229332&view=diff
==============================================================================
--- cxf/trunk/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SamlFormInHandler.java (original)
+++ cxf/trunk/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SamlFormInHandler.java Mon Jan  9 20:07:20 2012
@@ -39,7 +39,7 @@ public class SamlFormInHandler extends A
     private static final String SAML_ELEMENT = "SAMLToken";
     private static final String SAML_RELAY_STATE = "RelayState";
    
-    private FormEncodingProvider provider = new FormEncodingProvider();
+    private FormEncodingProvider<Form> provider = new FormEncodingProvider<Form>();
     
     public SamlFormInHandler() {
         provider.setExpectedEncoded(true);
@@ -77,10 +77,9 @@ public class SamlFormInHandler extends A
         return null;
     }
     
-    @SuppressWarnings("unchecked")
     private Form readFormData(Message message) {
         try {
-            return (Form)provider.readFrom((Class)Form.class, Form.class, 
+            return provider.readFrom(Form.class, Form.class, 
                               new Annotation[]{}, MediaType.APPLICATION_FORM_URLENCODED_TYPE, 
                               new MetadataMap<String, String>(), 
                               message.getContent(InputStream.class));

Modified: cxf/trunk/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/AbstractXmlSecOutInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/AbstractXmlSecOutInterceptor.java?rev=1229332&r1=1229331&r2=1229332&view=diff
==============================================================================
--- cxf/trunk/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/AbstractXmlSecOutInterceptor.java (original)
+++ cxf/trunk/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/AbstractXmlSecOutInterceptor.java Mon Jan  9 20:07:20 2012
@@ -110,13 +110,13 @@ public abstract class AbstractXmlSecOutI
         if (!(providerObject instanceof JAXBElementProvider)) {
             return null;
         }
-        JAXBElementProvider provider = (JAXBElementProvider)providerObject;
+        JAXBElementProvider<Object> provider = (JAXBElementProvider<Object>)providerObject;
         W3CDOMStreamWriter writer = new W3CDOMStreamWriter();
         m.setContent(XMLStreamWriter.class, writer);
-        provider.writeTo(body, body.getClass(), 
+        provider.writeTo(body, 
                          body.getClass(), new Annotation[]{},
                          MediaType.APPLICATION_XML_TYPE,
-                         (MultivaluedMap)m.get(Message.PROTOCOL_HEADERS), null);
+                         (MultivaluedMap<String, Object>)m.get(Message.PROTOCOL_HEADERS), null);
         return writer.getDocument();
     }
     

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookServer.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookServer.java?rev=1229332&r1=1229331&r2=1229332&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookServer.java (original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookServer.java Mon Jan  9 20:07:20 2012
@@ -43,11 +43,11 @@ public class BookServer extends Abstract
         List<Object> providers = new ArrayList<Object>();
         
         //default lifecycle is per-request, change it to singleton
-        BinaryDataProvider p = new BinaryDataProvider();
+        BinaryDataProvider<Object> p = new BinaryDataProvider<Object>();
         p.setProduceMediaTypes(Collections.singletonList("application/bar"));
         p.setEnableBuffering(true);
         providers.add(p);
-        JAXBElementProvider jaxbProvider = new JAXBElementProvider();
+        JAXBElementProvider<?> jaxbProvider = new JAXBElementProvider<Object>();
         Map<String, String> jaxbElementClassMap = new HashMap<String, String>(); 
         jaxbElementClassMap.put(BookNoXmlRootElement.class.getName(), "BookNoXmlRootElement");
         jaxbProvider.setJaxbElementClassMap(jaxbElementClassMap);

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/GenericHandlerWriter.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/GenericHandlerWriter.java?rev=1229332&r1=1229331&r2=1229332&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/GenericHandlerWriter.java (original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/GenericHandlerWriter.java Mon Jan  9 20:07:20 2012
@@ -32,7 +32,7 @@ import org.apache.cxf.jaxrs.provider.JAX
 import org.apache.cxf.jaxrs.utils.InjectionUtils;
 
 public class GenericHandlerWriter implements MessageBodyWriter<GenericHandler<Book>> {
-    JAXBElementProvider jaxb = new JAXBElementProvider();
+    JAXBElementProvider<Object> jaxb = new JAXBElementProvider<Object>();
     
     public GenericHandlerWriter() {
         



Mime
View raw message