Skip to content

Commit

Permalink
Update JacksonEvent tests
Browse files Browse the repository at this point in the history
Signed-off-by: Hai Yan <[email protected]>
  • Loading branch information
oeyh committed Feb 16, 2024
1 parent dbcd345 commit 39aa570
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ public void testIsValueAList_withNull() {

@ParameterizedTest
@ValueSource(strings = {"withSpecialChars*$%", "\\-withEscapeChars", "\\\\/withMultipleEscapeChars",
"with,Comma", "with:Colon", "with[Bracket", "with|Brace"})
"with,Comma", "with:Colon", "with|Brace"})
void testKey_withInvalidKey_throwsIllegalArgumentException(final String invalidKey) {
assertThrowsForKeyCheck(IllegalArgumentException.class, invalidKey);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public Collection<Record<Event>> doExecute(final Collection<Record<Event>> recor
}

if (config.isRemoveListIndices()) {
flattenedJson = removeListIndicesInKey(flattenedJson);
flattenedJson = removeListIndicesInKeys(flattenedJson);
}

updateEvent(recordEvent, flattenedJson);
Expand Down Expand Up @@ -95,7 +95,7 @@ private String getJsonPointer(final String outerKey, final String innerKey) {
}
}

private Map<String, Object> removeListIndicesInKey(final Map<String, Object> inputMap) {
private Map<String, Object> removeListIndicesInKeys(final Map<String, Object> inputMap) {
final Map<String, Object> resultMap = new HashMap<>();

for (final Map.Entry<String, Object> entry : inputMap.entrySet()) {
Expand Down

0 comments on commit 39aa570

Please sign in to comment.