Skip to content

Commit ec3d0db

Browse files
committed
CAMEL-10894: Improve test fix
1 parent 87c92b7 commit ec3d0db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

camel-core/src/main/java/org/apache/camel/processor/validation/SchemaReader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ protected SchemaFactory createSchemaFactory() {
173173
if (getResourceResolver() != null) {
174174
factory.setResourceResolver(getResourceResolver());
175175
}
176-
if (camelContext != null && !Boolean.parseBoolean(camelContext.getProperty(ACCESS_EXTERNAL_DTD))) {
176+
if (camelContext == null || !Boolean.parseBoolean(camelContext.getProperty(ACCESS_EXTERNAL_DTD))) {
177177
try {
178178
factory.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD, "");
179179
} catch (SAXException e) {

0 commit comments

Comments
 (0)