private @NotNull @Nls String createDuplicateDescription(@Nullable Object duplicateKey, @NotNull PsiElement duplicateElement) {
    String description;
    if (duplicateKey == myDefaultValue) {
      description = JavaErrorBundle.message("duplicate.default.switch.label");
    }
    else if (duplicateKey == myUnconditionalPattern) {
      description = JavaErrorBundle.message("duplicate.unconditional.pattern.label");
    }
    else {
      if (duplicateElement instanceof PsiLiteralExpression literalExpression) {
        description = JavaErrorBundle.message("duplicate.switch.label", literalExpression.getValue());
      }
      else {
        description = JavaErrorBundle.message("duplicate.switch.label", duplicateKey);
      }
    }
    return description;
  }
private @NotNull @Nls String createDuplicateDescription(@Nullable Object duplicateKey, @NotNull PsiElement duplicateElement)