Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 22897 invoked from network); 5 Feb 2008 14:06:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Feb 2008 14:06:40 -0000 Received: (qmail 96191 invoked by uid 500); 5 Feb 2008 14:06:29 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 96131 invoked by uid 500); 5 Feb 2008 14:06:29 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 96120 invoked by uid 99); 5 Feb 2008 14:06:29 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Feb 2008 06:06:29 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Feb 2008 14:06:20 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id ADA08714073 for ; Tue, 5 Feb 2008 06:06:12 -0800 (PST) Message-ID: <25921545.1202220372708.JavaMail.jira@brutus> Date: Tue, 5 Feb 2008 06:06:12 -0800 (PST) From: "Michael McCandless (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Commented: (LUCENE-1163) CharArraySet.contains(char[] text, int off, int len) does not work In-Reply-To: <2357057.1202217607638.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LUCENE-1163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12565751#action_12565751 ] Michael McCandless commented on LUCENE-1163: -------------------------------------------- Super, thanks Thomas! I just committed this. > CharArraySet.contains(char[] text, int off, int len) does not work > ------------------------------------------------------------------ > > Key: LUCENE-1163 > URL: https://issues.apache.org/jira/browse/LUCENE-1163 > Project: Lucene - Java > Issue Type: Bug > Affects Versions: 2.3 > Reporter: Thomas Peuss > Assignee: Michael McCandless > Fix For: 2.4 > > Attachments: CharArraySetShowBug.java, LUCENE-1163.patch > > > I try to use the CharArraySet for a filter I am writing. I heavily use char-arrays in my code to speed up things. I stumbled upon a bug in CharArraySet while doing that. > The method _public boolean contains(char[] text, int off, int len)_ seems not to work. > When I do > {code} > if (set.contains(buffer,offset,length) { > ... > } > {code} > my code fails. > But when I do > {code} > if (set.contains(new String(buffer,offset,length)) { > ... > } > {code} > everything works as expected. > Both variants should behave the same. I attach a small piece of code to show the problem. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org