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

Give Version parsing exceptions more descriptive error messages

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 4.10
    • 4.10.1, 5.0, 6.0
    • None
    • None
    • New

    Description

      As discussed on the dev list, it's spooky how Version.java tries to fully parse the incoming version string ... and then throw exceptions that lack details about what invalid value it received, which file contained the invalid value, etc.

      It also seems too low level to be checking versions (e.g. is not future proof for when 4.10 is passed a 5.x index by accident), and seems redundant with the codec headers we already have for checking versions?

      Should we just go back to lenient parsing?

      Attachments

        1. LUCENE-5952.patch
          16 kB
          Michael McCandless
        2. LUCENE-5952.patch
          21 kB
          Michael McCandless
        3. LUCENE-5952.patch
          17 kB
          Michael McCandless
        4. LUCENE-5952.patch
          28 kB
          Michael McCandless
        5. LUCENE-5952.patch
          30 kB
          Michael McCandless
        6. LUCENE-5952.patch
          31 kB
          Michael McCandless

        Activity

          People

            mikemccand Michael McCandless
            mikemccand Michael McCandless
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: