Skip to content

Commit e0e1b02

Browse files
authored
Merge pull request #323 from kkonrad/master
FIX: potential duplicate log entry due to race condition
2 parents f841582 + 24511a6 commit e0e1b02

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,8 +333,7 @@ public JsonValidator newValidator(ValidationContext validationContext, String sc
333333
try {
334334
Keyword kw = keywords.get(keyword);
335335
if (kw == null) {
336-
if (!UNKNOWN_KEYWORDS.containsKey(keyword)) {
337-
UNKNOWN_KEYWORDS.put(keyword, keyword);
336+
if (UNKNOWN_KEYWORDS.put(keyword, keyword) == null) {
338337
logger.warn("Unknown keyword " + keyword + " - you should define your own Meta Schema. If the keyword is irrelevant for validation, just use a NonValidationKeyword");
339338
}
340339
return null;

0 commit comments

Comments
 (0)