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/9c68a29b Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/9c68a29b Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/9c68a29b Branch: refs/heads/2.7.x-fixes Commit: 9c68a29bcdd5ad254a10b537315b0eb9277c4a4f Parents: 2497767 Author: Daniel Kulp <[email protected]> Authored: Wed May 7 13:47:41 2014 -0400 Committer: Daniel Kulp <[email protected]> Committed: Tue May 13 15:01:47 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/9c68a29b/api/src/test/java/org/apache/cxf/staxutils/StaxUtilsTest.java ---------------------------------------------------------------------- diff --git a/api/src/test/java/org/apache/cxf/staxutils/StaxUtilsTest.java b/api/src/test/java/org/apache/cxf/staxutils/StaxUtilsTest.java index 620726c..25e3c5e 100644 --- a/api/src/test/java/org/apache/cxf/staxutils/StaxUtilsTest.java +++ b/api/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();
