cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject [05/42] cxf git commit: [CXF-6971] Updating Jettison version to 1.3.8
Date Tue, 26 Jul 2016 00:41:10 GMT
[CXF-6971] Updating Jettison version to 1.3.8


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/8f8e587c
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/8f8e587c
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/8f8e587c

Branch: refs/heads/master-jaxrs-2.1
Commit: 8f8e587cde7ec97410da6b0586810ccf8f0f3233
Parents: 575dc4d
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Mon Jul 18 21:34:46 2016 +0300
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Mon Jul 18 21:34:46 2016 +0300

----------------------------------------------------------------------
 parent/pom.xml                                    |  2 +-
 .../cxf/jaxrs/provider/json/JSONProviderTest.java | 18 ++++++++++++++++++
 2 files changed, 19 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/8f8e587c/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index 82aa500..ff3ffd8 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -117,7 +117,7 @@
         <cxf.jaxb.xjc.version>${cxf.jaxb.version}</cxf.jaxb.xjc.version>
         <cxf.joda.time.version>2.7</cxf.joda.time.version>
         <cxf.jdom.version>1.0</cxf.jdom.version>
-        <cxf.jettison.version>1.3.7</cxf.jettison.version>
+        <cxf.jettison.version>1.3.8</cxf.jettison.version>
         <cxf.jetty8.version>8.1.19.v20160209</cxf.jetty8.version>
         <cxf.jetty9.version>9.3.5.v20151012</cxf.jetty9.version>
         <cxf.jetty.version>${cxf.jetty9.version}</cxf.jetty.version>

http://git-wip-us.apache.org/repos/asf/cxf/blob/8f8e587c/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/provider/json/JSONProviderTest.java
----------------------------------------------------------------------
diff --git a/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/provider/json/JSONProviderTest.java
b/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/provider/json/JSONProviderTest.java
index 1258e82..88a5ab7 100644
--- a/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/provider/json/JSONProviderTest.java
+++ b/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/provider/json/JSONProviderTest.java
@@ -1367,6 +1367,24 @@ public class JSONProviderTest extends Assert {
     }
     
     @Test
+    public void testAttributesAsElementsWithInteger() throws Exception {
+        JSONProvider<TagVO2Holder> provider = new JSONProvider<TagVO2Holder>();
+        provider.setAttributesToElements(true);
+        provider.setIgnoreNamespaces(true);
+        TagVO2 tag = new TagVO2("A", "B");
+        tag.setAttrInt(123);
+        TagVO2Holder holder = new TagVO2Holder();
+        holder.setTag(tag);
+        
+        ByteArrayOutputStream bos = new ByteArrayOutputStream();
+        provider.writeTo(holder, TagVO2Holder.class, TagVO2Holder.class,
+                       new Annotation[0], MediaType.TEXT_XML_TYPE, new MetadataMap<String,
Object>(), bos);
+        String expected = 
+            "{\"tagholder\":{\"attr\":\"attribute\",\"thetag\":{\"attrInt\":123,\"group\":\"B\",\"name\":\"A\"}}}";
+        assertEquals(expected, bos.toString());
+    }
+    
+    @Test
     public void testOutAttributesAsElementsForList() throws Exception {
 
         //Provider


Mime
View raw message