Organize imports in GPathResultConverter
Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/7bb8b76a Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/7bb8b76a Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/7bb8b76a Branch: refs/heads/master Commit: 7bb8b76aaa63236965aeacb4a6f98f57ba90b754 Parents: e657822 Author: Dominik Adam Przybysz <alien11...@gmail.com> Authored: Sun Aug 17 22:40:37 2014 +0200 Committer: Dominik Adam Przybysz <alien11...@gmail.com> Committed: Sun Aug 17 22:40:37 2014 +0200 ---------------------------------------------------------------------- .../apache/camel/groovy/converter/GPathResultConverter.java | 7 ------- .../camel/groovy/converter/GPathResultConverterTest.groovy | 7 ++++--- 2 files changed, 4 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/7bb8b76a/components/camel-groovy/src/main/java/org/apache/camel/groovy/converter/GPathResultConverter.java ---------------------------------------------------------------------- diff --git a/components/camel-groovy/src/main/java/org/apache/camel/groovy/converter/GPathResultConverter.java b/components/camel-groovy/src/main/java/org/apache/camel/groovy/converter/GPathResultConverter.java index f3c9118..561fc16 100644 --- a/components/camel-groovy/src/main/java/org/apache/camel/groovy/converter/GPathResultConverter.java +++ b/components/camel-groovy/src/main/java/org/apache/camel/groovy/converter/GPathResultConverter.java @@ -2,7 +2,6 @@ package org.apache.camel.groovy.converter; import groovy.util.XmlSlurper; import groovy.util.slurpersupport.GPathResult; -import groovy.xml.StreamingMarkupBuilder; import org.apache.camel.Converter; import org.apache.camel.Exchange; import org.apache.camel.StringSource; @@ -11,14 +10,8 @@ import org.w3c.dom.Node; import org.xml.sax.SAXException; import javax.xml.parsers.ParserConfigurationException; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerConfigurationException; import javax.xml.transform.TransformerException; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.dom.DOMSource; -import javax.xml.transform.stream.StreamResult; import java.io.IOException; -import java.io.StringWriter; @Converter public class GPathResultConverter { http://git-wip-us.apache.org/repos/asf/camel/blob/7bb8b76a/components/camel-groovy/src/test/groovy/org/apache/camel/groovy/converter/GPathResultConverterTest.groovy ---------------------------------------------------------------------- diff --git a/components/camel-groovy/src/test/groovy/org/apache/camel/groovy/converter/GPathResultConverterTest.groovy b/components/camel-groovy/src/test/groovy/org/apache/camel/groovy/converter/GPathResultConverterTest.groovy index c17feb8..517cfc0 100644 --- a/components/camel-groovy/src/test/groovy/org/apache/camel/groovy/converter/GPathResultConverterTest.groovy +++ b/components/camel-groovy/src/test/groovy/org/apache/camel/groovy/converter/GPathResultConverterTest.groovy @@ -8,9 +8,10 @@ import org.apache.camel.impl.DefaultCamelContext import org.apache.camel.impl.DefaultExchange import org.junit.Test import org.w3c.dom.Node -import javax.xml.parsers.DocumentBuilderFactory import org.xml.sax.InputSource +import javax.xml.parsers.DocumentBuilderFactory + import static org.junit.Assert.assertEquals import static org.junit.Assert.assertNotNull @@ -38,7 +39,7 @@ public class GPathResultConverterTest { @Test void "should convert node to GPathResult"() { Node node = DocumentBuilderFactory.newInstance().newDocumentBuilder() - .parse(new InputSource(new StringReader(xml))) + .parse(new InputSource(new StringReader(xml))) Exchange exchange = new DefaultExchange(context) exchange.in.setBody(node, Node) GPathResult result = exchange.in.getBody(GPathResult) @@ -46,7 +47,7 @@ public class GPathResultConverterTest { } private void checkGPathResult(GPathResult gPathResult) { - assertNotNull(gPathResult) + assertNotNull(gPathResult) assertEquals(gPathResult.name(), "test") assertEquals(gPathResult.elem1.text(), "This is test") }