cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [4/4] git commit: Remove some printlns and warnings from the test console
Date Wed, 07 May 2014 17:57:56 GMT
Remove some printlns and warnings from the test console


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

Branch: refs/heads/master
Commit: 5365fde2cf50167852ac5aec5099aef509eb66c3
Parents: 74c6e2b
Author: Daniel Kulp <dkulp@apache.org>
Authored: Wed May 7 13:47:41 2014 -0400
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Wed May 7 13:47:41 2014 -0400

----------------------------------------------------------------------
 .../java/org/apache/cxf/staxutils/StaxUtilsTest.java  | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/5365fde2/core/src/test/java/org/apache/cxf/staxutils/StaxUtilsTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/cxf/staxutils/StaxUtilsTest.java b/core/src/test/java/org/apache/cxf/staxutils/StaxUtilsTest.java
index 589b322..296216e 100644
--- a/core/src/test/java/org/apache/cxf/staxutils/StaxUtilsTest.java
+++ b/core/src/test/java/org/apache/cxf/staxutils/StaxUtilsTest.java
@@ -328,13 +328,14 @@ public class StaxUtilsTest extends Assert {
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         String xml = "<root xmlns=\"urn:org.apache.cxf:test\">Text</root>";
         StringReader stringReader = new StringReader(xml);
-        StreamSource source = new StreamSource(stringReader);
-        XMLStreamReader reader = StaxUtils.createXMLStreamReader(source);
+        //StreamSource source = new StreamSource(stringReader);
+        XMLStreamReader reader = StaxUtils.createXMLStreamReader(stringReader);
         XMLStreamWriter writer = StaxUtils.createXMLStreamWriter(baos);
         StaxSource staxSource = new StaxSource(reader);
         TransformerFactory trf = TransformerFactory.newInstance();
-        Transformer transformer = trf.newTransformer(new StreamSource(getTestStream("./resources/copy.xsl")));
-        System.out.println("Used transformer: " + transformer.getClass().getName());
+        Document doc = StaxUtils.read(getTestStream("./resources/copy.xsl"));
+        Transformer transformer = trf.newTransformer(new DOMSource(doc));
+        //System.out.println("Used transformer: " + transformer.getClass().getName());
         transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
         transformer.transform(staxSource, new StreamResult(baos));
         writer.flush();
@@ -355,8 +356,9 @@ public class StaxUtilsTest extends Assert {
             XMLStreamReader reader = StaxUtils.createXMLStreamReader(source);
             XMLStreamWriter writer = StaxUtils.createXMLStreamWriter(baos);
             StaxSource staxSource = new StaxSource(reader);
-            Transformer transformer = trf.newTransformer(new StreamSource(getTestStream("./resources/copy.xsl")));
-            System.out.println("Used transformer: " + transformer.getClass().getName());
+            Document doc = StaxUtils.read(getTestStream("./resources/copy.xsl"));
+            Transformer transformer = trf.newTransformer(new DOMSource(doc));
+            //System.out.println("Used transformer: " + transformer.getClass().getName());
             transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
             transformer.transform(staxSource, new StreamResult(baos));
             writer.flush();


Mime
View raw message