Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 3501 invoked from network); 7 Oct 2007 22:15:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Oct 2007 22:15:55 -0000 Received: (qmail 83463 invoked by uid 500); 7 Oct 2007 22:15:38 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 83427 invoked by uid 500); 7 Oct 2007 22:15:38 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 83416 invoked by uid 99); 7 Oct 2007 22:15:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 07 Oct 2007 15:15:38 -0700 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: 80.76.149.213 is neither permitted nor denied by domain of karl.wettin@gmail.com) Received: from [80.76.149.213] (HELO ch-smtp02.sth.basefarm.net) (80.76.149.213) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 07 Oct 2007 22:15:39 +0000 Received: from c83-249-118-113.bredband.comhem.se ([83.249.118.113]:56472 helo=[192.168.1.101]) by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.66) (envelope-from ) id 1IeeM4-00019U-8P for java-user@lucene.apache.org; Mon, 08 Oct 2007 00:12:08 +0200 Mime-Version: 1.0 (Apple Message framework v752.3) In-Reply-To: <1191777999.12906.1214589171@webmail.messagingengine.com> References: <9DDFDD4D-EF67-4C77-AE6E-FAC1105882DB@gmail.com> <1191757673.30911.1214561755@webmail.messagingengine.com> <866E2AE4-AA51-4E1E-9847-47B78A500822@gmail.com> <1191777999.12906.1214589171@webmail.messagingengine.com> Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <041B15FE-F2C2-46C4-B594-728A4F362FC4@gmail.com> Content-Transfer-Encoding: 7bit From: Karl Wettin Subject: Re: norms(String field, byte[] bytes, int offset) Date: Mon, 8 Oct 2007 00:03:54 +0200 To: java-user@lucene.apache.org X-Mailer: Apple Mail (2.752.3) X-Originating-IP: 83.249.118.113 X-Scan-Result: No virus found in message 1IeeM4-00019U-8P. X-Scan-Signature: ch-smtp02.sth.basefarm.net 1IeeM4-00019U-8P 41271da651e67142b61cc92ce033c981 X-Virus-Checked: Checked by ClamAV on apache.org 7 okt 2007 kl. 19.26 skrev Michael McCandless: > I guess we could change the code to only load up until the end of > the byte array that's passed in, but, that weakens the error checking? > Ie if the intent is to "load all norms", it's nice to catch the error > (that you passed in a too-small byte array) earlier rather than later. If it was me that wrote that code, I'd have MultiWhatNot to validate and throw the exception, if possible. But that's just me. > Or maybe we could add a new method whose purpose is to load a subset > of the norms? Is there are particular use case behind this? There is no use-case. I noticed this as a discrepancy between LUCENE-550 and the SegmentImplementation, and simply wondered why. -- karl --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org