dota17 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_r341914871
########## 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: '\\u0000' is shown as '\u0000', '\u0000' is shown as blank space. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services