cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: [CXF-6971] Updating Jettison version to 1.3.8
Date Mon, 18 Jul 2016 18:36:10 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes fc54df195 -> f0edb520d


[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/f0edb520
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/f0edb520
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/f0edb520

Branch: refs/heads/3.1.x-fixes
Commit: f0edb520db9b64ea5ba9b6a016b85eae6091d21c
Parents: fc54df1
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:35: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/f0edb520/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index 42fa215..10e72f4 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -116,7 +116,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.2.15.v20160210</cxf.jetty9.version>
         <cxf.jetty.version>${cxf.jetty9.version}</cxf.jetty.version>

http://git-wip-us.apache.org/repos/asf/cxf/blob/f0edb520/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 9819088..8113c0f 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