You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Andi Vajda (JIRA)" <ji...@apache.org> on 2010/07/09 12:30:55 UTC
[jira] Created: (LUCENE-2530) rename docsEnum.getBulkResult() to
make its role clearer
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
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
[jira] Updated: (LUCENE-2530) rename docsEnum.getBulkResult() to
make its role clearer
Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael McCandless updated LUCENE-2530:
---------------------------------------
Fix Version/s: 4.0
> 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
[jira] Commented: (LUCENE-2530) rename docsEnum.getBulkResult() to
make its role clearer
Posted by "Michael McCandless (JIRA)" <ji...@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