[ 
https://issues.apache.org/jira/browse/LUCENE-781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12468436
 ] 

Hoss Man commented on LUCENE-781:
---------------------------------

comments based on cursory read of latest patch(es)...

1) I still think the IndexReader[] constructor should *allways* call 
super(null) ... the current behavior could mask future problems if/when new 
methods get added to IndexReader.
2) what about MultiReader.directory() ? ... shoulnd't that throw Unsupported if 
false == hasSegmentInfos ?

#2 is a good example of why i believe in #1 ... 

> NPE in MultiReader.isCurrent() and getVersion()
> -----------------------------------------------
>
>                 Key: LUCENE-781
>                 URL: https://issues.apache.org/jira/browse/LUCENE-781
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Index
>            Reporter: Daniel Naber
>         Attachments: multireader.diff, multireader.diff, 
> multireader_test.diff, multireader_test.diff
>
>
> I'm attaching a fix for the NPE in MultiReader.isCurrent() plus a testcase. 
> For getVersion(), we should throw a better exception that NPE. I will commit 
> unless someone objects or has a better idea.

-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to