From issues-return-80335-apmail-commons-issues-archive=commons.apache.org@commons.apache.org Mon Nov 4 06:38:24 2019 Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by minotaur.apache.org (Postfix) with SMTP id A2C5A1908F for ; Mon, 4 Nov 2019 06:38:23 +0000 (UTC) Received: (qmail 63979 invoked by uid 500); 4 Nov 2019 06:38:22 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 63888 invoked by uid 500); 4 Nov 2019 06:38:22 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 63875 invoked by uid 99); 4 Nov 2019 06:38:22 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Nov 2019 06:38:22 +0000 From: GitBox To: issues@commons.apache.org Subject: [GitHub] [commons-collections] dota17 commented on a change in pull request #99: [COLLECTIONS-714] Throw exception when put \u0000 to trie Message-ID: <157284950256.14938.11212915812584246423.gitbox@gitbox.apache.org> Date: Mon, 04 Nov 2019 06:38:22 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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: users@infra.apache.org With regards, Apache Git Services