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

fail precommit on incompleteEnumSwitch

Details

    • Task
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 7.3, 8.0
    • None
    • None
    • New

    Description

      Illustration assuming an enum that has values A, B, C and D:

      switch (...) {
        case A:
        case B:
          ...
          break;
        case C:
           ...
          break;
        case D:
          break;
      }
      

      and

      switch (...) {
        case A:
        case B:
          ...
          break;
        case C:
          ...
          break;
        default:
          break;
      }
      

      would pass but

      switch (...) {
        case A:
        case B:
          ...
          break;
        case C:
          ...
          break;
      }
      

      would fail.

      Attachments

        1. LUCENE-8167.patch
          2 kB
          Christine Poerschke
        2. LUCENE-8167-prep.patch
          8 kB
          Christine Poerschke

        Issue Links

          Activity

            People

              cpoerschke Christine Poerschke
              cpoerschke Christine Poerschke
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: