cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1430988 - in /cxf/branches/2.6.x-fixes: rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/atom/ systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/
Date Wed, 09 Jan 2013 18:05:18 GMT
Author: dkulp
Date: Wed Jan  9 18:05:18 2013
New Revision: 1430988

URL: http://svn.apache.org/viewvc?rev=1430988&view=rev
Log:
Merged revisions 1430982 via  git cherry-pick from
https://svn.apache.org/repos/asf/cxf/branches/2.7.x-fixes

........
  r1430982 | dkulp | 2013-01-09 13:03:20 -0500 (Wed, 09 Jan 2013) | 10 lines

  Merged revisions 1430564 via  git cherry-pick from
  https://svn.apache.org/repos/asf/cxf/trunk

  ........
    r1430564 | dkulp | 2013-01-08 16:59:24 -0500 (Tue, 08 Jan 2013) | 2 lines

    Update tests to work with the Abdera 1.1.3/Axiom 1.2.14

  ........

........

Modified:
    cxf/branches/2.6.x-fixes/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/atom/AtomPojoProvider.java
    cxf/branches/2.6.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/AtomBookStore.java
    cxf/branches/2.6.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/AtomUtils.java
    cxf/branches/2.6.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSAtomBookTest.java

Modified: cxf/branches/2.6.x-fixes/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/atom/AtomPojoProvider.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/atom/AtomPojoProvider.java?rev=1430988&r1=1430987&r2=1430988&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/atom/AtomPojoProvider.java
(original)
+++ cxf/branches/2.6.x-fixes/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/atom/AtomPojoProvider.java
Wed Jan  9 18:05:18 2013
@@ -459,9 +459,9 @@ public class AtomPojoProvider extends Ab
     }
     
     protected void setEntryContent(Factory factory, Entry e, String content) {
-        e.setContentElement(factory.newContent());
-        e.getContentElement().setContentType(Content.Type.XML);
-        e.getContentElement().setValue(content);
+        Content ct = factory.newContent(Content.Type.XML);
+        ct.setValue(content);
+        e.setContentElement(ct);
     }
     
     protected void setEntryProperties(Factory factory, Entry entry, 

Modified: cxf/branches/2.6.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/AtomBookStore.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/AtomBookStore.java?rev=1430988&r1=1430987&r2=1430988&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/AtomBookStore.java
(original)
+++ cxf/branches/2.6.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/AtomBookStore.java
Wed Jan  9 18:05:18 2013
@@ -100,7 +100,7 @@ public class AtomBookStore {
         try {
             for (Book b : books.values()) {
                 
-                Entry e = AtomUtils.createBookEntry(b);
+                Entry e = AtomUtils.createBookEntry(factory, b);
                 
                 f.addEntry(e);
             }

Modified: cxf/branches/2.6.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/AtomUtils.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/AtomUtils.java?rev=1430988&r1=1430987&r2=1430988&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/AtomUtils.java
(original)
+++ cxf/branches/2.6.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/AtomUtils.java
Wed Jan  9 18:05:18 2013
@@ -36,14 +36,18 @@ public final class AtomUtils {
     }
     
     public static Entry createBookEntry(Book b) throws Exception {
-        return createBookEntry(b, null);
+        return createBookEntry(Abdera.getNewFactory(), b, null);
+    }
+    public static Entry createBookEntry(Factory factory, Book b) throws Exception {
+        return createBookEntry(factory, b, null);
     }
-    
     public static Entry createBookEntry(Book b, String baseUri) throws Exception {
-        Factory factory = Abdera.getNewFactory();
+        return createBookEntry(Abdera.getNewFactory(), b, baseUri);
+    }    
+    public static Entry createBookEntry(Factory factory, Book b, String baseUri) throws Exception
{
         JAXBContext jc = JAXBContext.newInstance(Book.class);
         
-        Entry e = factory.getAbdera().newEntry();
+        Entry e = factory.newEntry();
         if (baseUri != null) {
             e.setBaseUri(baseUri);
         }
@@ -53,10 +57,8 @@ public final class AtomUtils {
         
         StringWriter writer = new StringWriter();
         jc.createMarshaller().marshal(b, writer);
-        
-        e.setContentElement(factory.newContent());
-        e.getContentElement().setContentType(Content.Type.XML);
-        e.getContentElement().setValue(writer.toString());
+
+        e.setContent(writer.toString(), Content.Type.XML);
         
         return e;
     }

Modified: cxf/branches/2.6.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSAtomBookTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSAtomBookTest.java?rev=1430988&r1=1430987&r2=1430988&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSAtomBookTest.java
(original)
+++ cxf/branches/2.6.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSAtomBookTest.java
Wed Jan  9 18:05:18 2013
@@ -205,10 +205,9 @@ public class JAXRSAtomBookTest extends A
         StringWriter writer = new StringWriter();
         jc.createMarshaller().marshal(b, writer);
         
-        e.setContentElement(factory.newContent());
-        e.getContentElement().setContentType(Content.Type.XML);
-        e.getContentElement().setValue(writer.toString());
-        
+        Content ct = factory.newContent(Content.Type.XML);
+        ct.setValue(writer.toString());
+        e.setContentElement(ct);
         return e;
     }   
     



Mime
View raw message