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

Give Version parsing exceptions more descriptive error messages

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 4.10
    • Fix Version/s: 4.10.1, 5.0, 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: