Skip to content

Commit 00c8853

Browse files
committed
Add null check in validationContext.getConfig()
1 parent a0e00e1 commit 00c8853

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/networknt/schema/PatternValidator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public PatternValidator(String schemaPath, JsonNode schemaNode, JsonSchema paren
4545
if (schemaNode != null && schemaNode.isTextual()) {
4646
pattern = schemaNode.textValue();
4747
try {
48-
compileRegexPattern(pattern, validationContext.getConfig().isEcma262Validator());
48+
compileRegexPattern(pattern, validationContext.getConfig() != null && validationContext.getConfig().isEcma262Validator());
4949
} catch (PatternSyntaxException pse) {
5050
logger.error("Failed to compile pattern : Invalid syntax [" + pattern + "]", pse);
5151
throw pse;

0 commit comments

Comments
 (0)