Return-Path: Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: (qmail 17619 invoked from network); 9 Jul 2010 10:51:19 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 9 Jul 2010 10:51:19 -0000 Received: (qmail 52092 invoked by uid 500); 9 Jul 2010 10:51:18 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 51657 invoked by uid 500); 9 Jul 2010 10:51:15 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 51642 invoked by uid 99); 9 Jul 2010 10:51:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Jul 2010 10:51:14 +0000 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.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Jul 2010 10:51:11 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o69AooYN001387 for ; Fri, 9 Jul 2010 10:50:50 GMT Message-ID: <8339797.281921278672650061.JavaMail.jira@thor> Date: Fri, 9 Jul 2010 06:50:50 -0400 (EDT) From: "Michael McCandless (JIRA)" To: dev@lucene.apache.org Subject: [jira] Commented: (LUCENE-2530) rename docsEnum.getBulkResult() to make its role clearer In-Reply-To: <24322647.281671278671455993.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LUCENE-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12886676#action_12886676 ] Michael McCandless commented on LUCENE-2530: -------------------------------------------- I agree, we should rename it, to make it clear it's mandatory that you call it. I like prepareBulkResult. > rename docsEnum.getBulkResult() to make its role clearer > -------------------------------------------------------- > > Key: LUCENE-2530 > URL: https://issues.apache.org/jira/browse/LUCENE-2530 > Project: Lucene - Java > Issue Type: Bug > Components: Index > Affects Versions: 4.0 > Reporter: Andi Vajda > Assignee: Michael McCandless > Priority: Minor > Fix For: 4.0 > > > Before docsEnum.read() can be called a BulkResult instance must be allocated for it (it == the default implementation of that method). > This is done by calling docsEnum.getBulkResult(). Failure to call this method before read() is called results in a NullPointerException. > It is somewhat counterintuitive to "get" the results of an operation before calling said operation. > Maybe this method should be renamed to something more definite-sounding like obtainBulkResult() or prepareBulkResult() ? -- 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: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org