[ https://issues.apache.org/jira/browse/LUCENE-781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12467957 ]
Hoss Man commented on LUCENE-781: --------------------------------- Lemme put it this way: I'd rather write a new IndexReaderUtils class, with a static isMultiReaderCurrent(MultiReader) method that uses instanceOf to recursively walk all fo the sub indexes then to make MultiReader.isCurrent() do that ... because then people using hte method are clear about what the value of that boolean means. > Just that it feels a bit uncomfortable to throw unsupported for existing API > of a method with > well defined meaning that is quite easy to implement (relying on that anyhow > it was never > implemented correctly). I agree, it feels dirty ... but it feels safer too. i certainly won't obejct if someone commits a recursive method for isCurrent -- it's just not my prefrence. I would object to a recursive isOptimized ... that one really doens't make sense at all for a multi-directory MultiReader ... in theory it should allways return false since by definition the index is not a single segment, but if you do that, so code could try to optimize it. > 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_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]