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

Review usages of hard-coded Version constants

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 4.7, 6.0
    • 4.7, 6.0
    • core/other
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: