Lucene - Core
  1. Lucene - Core
  2. LUCENE-6068

Remove reader.fields() == null checks everywhere

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.0, 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      I don't know how this got this way, but it never returns null. SegmentReader even asserts this. But the api requires consumers to do a bunch of useless null checks. This is a bug.

        Activity

        Hide
        Ryan Ernst added a comment -

        +1, It's nice to remove useless code!

        Show
        Ryan Ernst added a comment - +1, It's nice to remove useless code!
        Hide
        ASF subversion and git services added a comment -

        Commit 1641239 from Robert Muir in branch 'dev/trunk'
        [ https://svn.apache.org/r1641239 ]

        LUCENE-6068: LeafReader.fields never returns null

        Show
        ASF subversion and git services added a comment - Commit 1641239 from Robert Muir in branch 'dev/trunk' [ https://svn.apache.org/r1641239 ] LUCENE-6068 : LeafReader.fields never returns null
        Hide
        ASF subversion and git services added a comment -

        Commit 1641240 from Robert Muir in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1641240 ]

        LUCENE-6068: LeafReader.fields never returns null

        Show
        ASF subversion and git services added a comment - Commit 1641240 from Robert Muir in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1641240 ] LUCENE-6068 : LeafReader.fields never returns null
        Hide
        Anshum Gupta added a comment -

        Bulk close after 5.0 release.

        Show
        Anshum Gupta added a comment - Bulk close after 5.0 release.

          People

          • Assignee:
            Unassigned
            Reporter:
            Robert Muir
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development