Fixed CS
Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/d74a7636 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d74a7636 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d74a7636 Branch: refs/heads/camel-2.14.x Commit: d74a76364e36312f4bde0b10615f941bd299b192 Parents: 06db9e0 Author: Claus Ibsen <davscl...@apache.org> Authored: Mon Mar 2 09:18:23 2015 +0100 Committer: Claus Ibsen <davscl...@apache.org> Committed: Mon Mar 2 11:21:13 2015 +0100 ---------------------------------------------------------------------- .../org/apache/camel/builder/xml/XPathFeatureTest.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/d74a7636/camel-core/src/test/java/org/apache/camel/builder/xml/XPathFeatureTest.java ---------------------------------------------------------------------- diff --git a/camel-core/src/test/java/org/apache/camel/builder/xml/XPathFeatureTest.java b/camel-core/src/test/java/org/apache/camel/builder/xml/XPathFeatureTest.java index dfad770..4b867c3 100644 --- a/camel-core/src/test/java/org/apache/camel/builder/xml/XPathFeatureTest.java +++ b/camel-core/src/test/java/org/apache/camel/builder/xml/XPathFeatureTest.java @@ -16,21 +16,21 @@ */ package org.apache.camel.builder.xml; - import java.io.FileNotFoundException; +import org.xml.sax.SAXParseException; + import org.apache.camel.ContextTestSupport; import org.apache.camel.Exchange; import org.apache.camel.NoTypeConversionAvailableException; import org.apache.camel.RuntimeCamelException; import org.apache.camel.TypeConversionException; import org.apache.camel.converter.jaxp.XmlConverter; -import org.xml.sax.SAXParseException; import static org.apache.camel.builder.xml.XPathBuilder.xpath; public class XPathFeatureTest extends ContextTestSupport { - public static final String DOM_BUILER_FACTORY_FEATRUE = XmlConverter.DOCUMENT_BUILDER_FACTORY_FEATURE; + public static final String DOM_BUILDER_FACTORY_FEATURE = XmlConverter.DOCUMENT_BUILDER_FACTORY_FEATURE; public static final String XML_DATA = " <!DOCTYPE foo [ " + " <!ELEMENT foo ANY > <!ENTITY xxe SYSTEM \"file:///bin/test.sh\" >]> <test> &xxe; </test>"; @@ -48,9 +48,8 @@ public class XPathFeatureTest extends ContextTestSupport { } public void testXPath() throws Exception { - // Set this feature will enable the external general entities - System.setProperty(DOM_BUILER_FACTORY_FEATRUE + ":" + System.setProperty(DOM_BUILDER_FACTORY_FEATURE + ":" + "http://xml.org/sax/features/external-general-entities", "true"); try { xpath("/").stringResult().evaluate(createExchange(XML_DATA)); @@ -59,7 +58,7 @@ public class XPathFeatureTest extends ContextTestSupport { assertTrue("Get a wrong exception cause.", ex.getCause() instanceof RuntimeCamelException); assertTrue("Get a wrong exception cause.", ex.getCause().getCause() instanceof FileNotFoundException); } finally { - System.clearProperty(DOM_BUILER_FACTORY_FEATRUE + ":" + System.clearProperty(DOM_BUILDER_FACTORY_FEATURE + ":" + "http://xml.org/sax/features/external-general-entities"); } } @@ -89,5 +88,4 @@ public class XPathFeatureTest extends ContextTestSupport { return exchange; } - }