You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Hugh Cayless (JIRA)" <ji...@apache.org> on 2009/07/16 15:44:14 UTC

[jira] Issue Comment Edited: (LUCENE-1748) getPayloadSpans on org.apache.lucene.search.spans.SpanQuery should be abstract

    [ https://issues.apache.org/jira/browse/LUCENE-1748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12731940#action_12731940 ] 

Hugh Cayless edited comment on LUCENE-1748 at 7/16/09 6:43 AM:
---------------------------------------------------------------

Ah.  I figured it would be something like that.  Yes, if abstract isn't possible, an UnsupportedOperationException would at least get closer to the source of the problem.

>From my perspective at least, backwards compatibility is already broken, since Lucene doesn't work with SpanQuerys that don't implement getPayloadSpans--but I understand y'all will have different requirements in this regard.

      was (Author: hcayless):
    Ah.  I figured it would be something like that.  Yes, if abstract isn't possible, an UnsupportedOperationException would at least get closer to the source of the problem.
  
> 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org