Lucene - Core
  1. Lucene - Core
  2. LUCENE-4520

ValueSource.getSortField shouldn't throw IOException

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.1, 6.0
    • Component/s: core/search
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      ValueSource.getSortField just returns a new ValueSourceSortField, whose constructor doesn't declare any checked exceptions. So adding the throws clause to the method declaration means adding pointless try-catch warts to client code.

      1. LUCENE-4520.patch
        4 kB
        Alan Woodward

        Activity

        Hide
        Robert Muir added a comment -

        At some point Steve had cleaned up the useless declared exceptions that weren't actually thrown... I guess this one slipped in since them.

        Show
        Robert Muir added a comment - At some point Steve had cleaned up the useless declared exceptions that weren't actually thrown... I guess this one slipped in since them.
        Hide
        Robert Muir added a comment -

        oh i see, abstract class, non-final method, we couldnt safely do it.

        But its marked experimental. if nothing is throwing IOE today, I think we just should remove it and worry about it when the time comes?

        Show
        Robert Muir added a comment - oh i see, abstract class, non-final method, we couldnt safely do it. But its marked experimental. if nothing is throwing IOE today, I think we just should remove it and worry about it when the time comes?
        Hide
        Alan Woodward added a comment -

        Fixed: trunk r1404523, 4x r1404537

        Show
        Alan Woodward added a comment - Fixed: trunk r1404523, 4x r1404537
        Hide
        Commit Tag Bot added a comment -

        [branch_4x commit] Alan Woodward
        http://svn.apache.org/viewvc?view=revision&revision=1404537

        LUCENE-4520: ValueSource.getSortField() shouldn't throw IOException

        Show
        Commit Tag Bot added a comment - [branch_4x commit] Alan Woodward http://svn.apache.org/viewvc?view=revision&revision=1404537 LUCENE-4520 : ValueSource.getSortField() shouldn't throw IOException

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development