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

Review usages of hard-coded Version constants

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.7, 6.0
    • Fix Version/s: 4.7, 6.0
    • Component/s: core/other
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      There are some hard-coded Version.LUCENE_XY constants used in various places. Some of these are intentional and appropriate:

      • in deprecated code, e.g. ArabicLetterTokenizer, deprecated in 3.1, uses Version.LUCENE_31
      • to make behavior version-dependent (e.g. StandardTokenizer and other analysis components)
      • to test different behavior at different points in history (e.g. TestStopFilter to test position increments)

      But should hard-coded constants be used elsewhere?

      For those that should remain, and need to be updated with each release, there should be an easy way to find them.

        Attachments

        1. LUCENE-5364-branch_4x.patch
          38 kB
          Steven Rowe
        2. LUCENE-5364-trunk.patch
          37 kB
          Steven Rowe
        3. LUCENE-5364-trunk.patch
          37 kB
          Steven Rowe

          Activity

            People

            • Assignee:
              sarowe Steven Rowe
              Reporter:
              sarowe Steven Rowe
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: