private void visitSwitchBlock(PsiSwitchBlock block) {
      final PsiCodeBlock body = block.getBody();
      if (body == null) {
        return;
      }
      for (PsiStatement statement : body.getStatements()) {
        if (!(statement instanceof PsiLabeledStatement labeledStatement)) {
          continue;
        }
        registerError(labeledStatement.getLabelIdentifier(), block);
      }
    }
private void visitSwitchBlock(PsiSwitchBlock block)