Skip to content

Commit

Permalink
fix typo in string matching
Browse files Browse the repository at this point in the history
Signed-off-by: Kaushal Kumar <[email protected]>
  • Loading branch information
kaushalmahi12 committed Jan 7, 2025
1 parent 1e4030d commit 24420b4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public void insert(String key, String value) {
}

private boolean isValidValue(String value) {
return ALLOWED_ATTRIBUTE_VALUES.matches(value);
return value.matches(ALLOWED_ATTRIBUTE_VALUES);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,6 @@ public void testInsertAndSearchEmptyString() {
assertEquals(Collections.singletonList("empty"), trie.search(""));
}

@Test
public void testInsertEmptyValue() {
trie.insert("emptyvalue", "");
assertEquals(Collections.singletonList(""), trie.search("emptyvalue"));
}

@Test
public void testDeleteEmptyString() {
Expand Down

0 comments on commit 24420b4

Please sign in to comment.