Rephrase UnnecessaryDefaultInEnumSwitch to be a bit more correct.
Rephrase UnnecessaryDefaultInEnumSwitch to be a bit more correct.

The only case I think would be unsafe is:

  switch (..) {
    case A:
      break;
    case B:
      <statements>
    default:
      <more statements>
   }

As mentioned below there are other problem cases with definite assignment, but anything that doesn't have cases falling through into the `default` is safe if it builds.

PiperOrigin-RevId: 391949298

google/error-prone,google/error-prone