Skip to content

Fix bug with overflow bits in patricia trie#127

Open
emmanuellegedin wants to merge 1 commit intoatilika:masterfrom
emmanuellegedin:fix-patricia-trie-overflow-bits
Open

Fix bug with overflow bits in patricia trie#127
emmanuellegedin wants to merge 1 commit intoatilika:masterfrom
emmanuellegedin:fix-patricia-trie-overflow-bits

Conversation

@emmanuellegedin
Copy link
Copy Markdown
Contributor

I noticed an edge case that causes the put method of PatriciaTrie to crash. This happens when one tries to insert some string and also the same string appended with one or more U+FFFF.

For example:

PatriciaTrie<String> trie = new PatriciaTrie<>();
trie.put("a", "0");
trie.put("a\uFFFF", "1");

causes an exception.

This PR fixes the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant