From 22c355bb4ffb500405499d189db30932ca5aac92 Mon Sep 17 00:00:00 2001 From: Tomohisa Igarashi Date: Sat, 25 Feb 2017 16:59:31 +0900 Subject: [PATCH] CAMEL-10894 Fixed test failure --- .../org/apache/camel/processor/validation/SchemaReader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/camel-core/src/main/java/org/apache/camel/processor/validation/SchemaReader.java b/camel-core/src/main/java/org/apache/camel/processor/validation/SchemaReader.java index 69e9afceea04e..65719faeb2bb3 100644 --- a/camel-core/src/main/java/org/apache/camel/processor/validation/SchemaReader.java +++ b/camel-core/src/main/java/org/apache/camel/processor/validation/SchemaReader.java @@ -173,7 +173,7 @@ protected SchemaFactory createSchemaFactory() { if (getResourceResolver() != null) { factory.setResourceResolver(getResourceResolver()); } - if (!Boolean.parseBoolean(camelContext.getProperty(ACCESS_EXTERNAL_DTD))) { + if (camelContext != null && !Boolean.parseBoolean(camelContext.getProperty(ACCESS_EXTERNAL_DTD))) { try { factory.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD, ""); } catch (SAXException e) {