cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1089835 - in /cxf/branches/2.3.x-fixes: ./ rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/JSONProviderTest.java rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/resources/SuperBook.java
Date Thu, 07 Apr 2011 11:49:37 GMT
Author: sergeyb
Date: Thu Apr  7 11:49:36 2011
New Revision: 1089835

URL: http://svn.apache.org/viewvc?rev=1089835&view=rev
Log:
Merged revisions 1089829 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1089829 | sergeyb | 2011-04-07 12:31:41 +0100 (Thu, 07 Apr 2011) | 1 line
  
  [CXF-2916] Adding a temporarily disabled test checking JSON nulls are unmarshalled as String
empty values
........

Modified:
    cxf/branches/2.3.x-fixes/   (props changed)
    cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/JSONProviderTest.java
    cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/resources/SuperBook.java

Propchange: cxf/branches/2.3.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Apr  7 11:49:36 2011
@@ -1 +1 @@
-/cxf/trunk:1089407,1089487,1089512
+/cxf/trunk:1089407,1089487,1089512,1089829

Propchange: cxf/branches/2.3.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/JSONProviderTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/JSONProviderTest.java?rev=1089835&r1=1089834&r2=1089835&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/JSONProviderTest.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/JSONProviderTest.java
Thu Apr  7 11:49:36 2011
@@ -509,6 +509,29 @@ public class JSONProviderTest extends As
         assertEquals(1, list.size());
         SuperBook book = (SuperBook)list.get(0);
         assertEquals(124L, book.getSuperId());
+        assertEquals(123L, book.getId());
+        assertEquals("CXF Rocks", book.getName());
+    }
+    
+    @SuppressWarnings("unchecked")
+    @Test
+    @Ignore("Enable once http://jira.codehaus.org/browse/JETTISON-89 gets resolved")
+    public void testReadListOfDerivedTypesWithNullField() throws Exception {
+        JSONProvider p = new JSONProvider();
+        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, 
+                                          null, null, new ByteArrayInputStream(bytes));
+        Books2 books = (Books2)books2Object;
+        List<? extends Book> list = books.getBooks();
+        assertEquals(1, list.size());
+        SuperBook book = (SuperBook)list.get(0);
+        assertEquals(124L, book.getSuperId());
+        assertEquals(0, book.getName().length());
     }
     
     @Test

Modified: cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/resources/SuperBook.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/resources/SuperBook.java?rev=1089835&r1=1089834&r2=1089835&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/resources/SuperBook.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/resources/SuperBook.java
Thu Apr  7 11:49:36 2011
@@ -40,4 +40,5 @@ public class SuperBook extends Book {
     public long getSuperId() {
         return superId;
     }
+
 }



Mime
View raw message