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

FieldComparatorSource.newComparator() doesn't need to throw IOException

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.5
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      All IO operations on FieldComparator are done in .getLeafComparator(), so there's no need to declare IOException on their constructors.

      This bubbles back up and lets us remove throws clauses from a number of constructors, TopDocs.merge(), and so on.

      1. LUCENE-7644.patch
        40 kB
        Alan Woodward

        Activity

        Hide
        romseygeek Alan Woodward added a comment -

        Here's a patch.

        Show
        romseygeek Alan Woodward added a comment - Here's a patch.
        Hide
        jpountz Adrien Grand added a comment -

        +1

        Show
        jpountz Adrien Grand added a comment - +1
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 5988ab95bc979395394999fa9e880bac446a169a in lucene-solr's branch refs/heads/branch_6x from Alan Woodward
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=5988ab9 ]

        LUCENE-7644: FieldComparatorSource.newComparator() doesn't need to throw IOException

        This allos us to also remove the throws clause on SortField.getComparator(),
        TopDocs.merge() and various Collector constructors

        Show
        jira-bot ASF subversion and git services added a comment - Commit 5988ab95bc979395394999fa9e880bac446a169a in lucene-solr's branch refs/heads/branch_6x from Alan Woodward [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=5988ab9 ] LUCENE-7644 : FieldComparatorSource.newComparator() doesn't need to throw IOException This allos us to also remove the throws clause on SortField.getComparator(), TopDocs.merge() and various Collector constructors
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 8c2ef3bc7fbebe8105c2646c81489aa9393ad402 in lucene-solr's branch refs/heads/master from Alan Woodward
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=8c2ef3b ]

        LUCENE-7644: FieldComparatorSource.newComparator() doesn't need to throw IOException

        This allos us to also remove the throws clause on SortField.getComparator(),
        TopDocs.merge() and various Collector constructors

        Show
        jira-bot ASF subversion and git services added a comment - Commit 8c2ef3bc7fbebe8105c2646c81489aa9393ad402 in lucene-solr's branch refs/heads/master from Alan Woodward [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=8c2ef3b ] LUCENE-7644 : FieldComparatorSource.newComparator() doesn't need to throw IOException This allos us to also remove the throws clause on SortField.getComparator(), TopDocs.merge() and various Collector constructors

          People

          • Assignee:
            romseygeek Alan Woodward
            Reporter:
            romseygeek Alan Woodward
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development