Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 79259 invoked from network); 12 Feb 2008 11:25:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Feb 2008 11:25:34 -0000 Received: (qmail 61257 invoked by uid 500); 12 Feb 2008 11:25:25 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 61214 invoked by uid 500); 12 Feb 2008 11:25:25 -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 61201 invoked by uid 99); 12 Feb 2008 11:25:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Feb 2008 03:25:25 -0800 X-ASF-Spam-Status: No, hits=-2000.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, 12 Feb 2008 11:24:48 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 98DBF71406C for ; Tue, 12 Feb 2008 03:25:08 -0800 (PST) Message-ID: <15525883.1202815508623.JavaMail.jira@brutus> Date: Tue, 12 Feb 2008 03:25:08 -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=12568056#action_12568056 ] Michael McCandless commented on LUCENE-1163: -------------------------------------------- Backported to 2.3 > 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