[ https://issues.apache.org/jira/browse/LUCENE-1748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12731984#action_12731984 ]
Mark Miller commented on LUCENE-1748: ------------------------------------- bq. the whole getPayloadSpans deal is a herecy. heh. don't dig too deep - it also has to load all of the payloads as it matches whether you ask for them or not (if they exist). The ordered or unordered matcher also has to load them and dump them in certain situation when they are not actually needed. Lets look at what we need to do to fix this - we don't have to worry too much about back compat, cause its already pretty screwed I think. > getPayloadSpans on org.apache.lucene.search.spans.SpanQuery should be abstract > ------------------------------------------------------------------------------ > > Key: LUCENE-1748 > URL: https://issues.apache.org/jira/browse/LUCENE-1748 > Project: Lucene - Java > Issue Type: Bug > Components: Query/Scoring > Affects Versions: 2.4, 2.4.1 > Environment: all > Reporter: Hugh Cayless > Fix For: 2.4.2 > > > I just spent a long time tracking down a bug resulting from upgrading to > Lucene 2.4.1 on a project that implements some SpanQuerys of its own and was > written against 2.3. Since the project's SpanQuerys didn't implement > getPayloadSpans, the call to that method went to SpanQuery.getPayloadSpans > which returned null and caused a NullPointerException in the Lucene code, far > away from the actual source of the problem. > It would be much better for this kind of thing to show up at compile time, I > think. > Thanks! -- 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: java-dev-unsubscr...@lucene.apache.org For additional commands, e-mail: java-dev-h...@lucene.apache.org