Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-1748

getPayloadSpans on org.apache.lucene.search.spans.SpanQuery should be abstract

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4, 2.4.1
    • Fix Version/s: 2.9
    • Component/s: core/query/scoring
    • Labels:
      None
    • Environment:

      all

    • Lucene Fields:
      New, Patch Available

      Description

      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!

        Attachments

        1. LUCENE-1748.patch
          7 kB
          Mark Miller
        2. LUCENE-1748.patch
          33 kB
          Mark Miller
        3. LUCENE-1748.patch
          34 kB
          Mark Miller

          Activity

            People

            • Assignee:
              markrmiller@gmail.com Mark Miller
              Reporter:
              hcayless Hugh Cayless
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: