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

fail precommit on incompleteEnumSwitch

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: master (8.0), 7.3
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      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-prep.patch
          8 kB
          Christine Poerschke
        2. LUCENE-8167.patch
          2 kB
          Christine Poerschke

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: