melloware commented on a change in pull request #99: [COLLECTIONS-714] Throw
exception when put \u0000 to trie
URL: https://github.com/apache/commons-collections/pull/99#discussion_r341851667
##########
File path:
src/main/java/org/apache/commons/collections4/trie/analyzer/StringKeyAnalyzer.java
##########
@@ -82,6 +82,9 @@ public int bitIndex(final String key, final int
offsetInBits, final int lengthIn
k = 0;
} else {
k = key.charAt(index1);
+ if (k == 0) {
+ throw new IllegalArgumentException("Don't support
'\\u0000' in the key.");
+ }
Review comment:
A better message might be "Character '\\u0000' is not supported in the key."
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services