private static void tryToCompactCanonicalCtor(@NotNull PsiClass record) {
    PsiMethod canonicalCtor = ArrayUtil.getFirstElement(record.getConstructors());
    if (canonicalCtor != null) {
      PsiCodeBlock ctorBody = canonicalCtor.getBody();
      if (ctorBody != null) {
        StreamEx.of(ctorBody.getStatements()).select(PsiExpressionStatement.class)
          .filter(st -> JavaPsiConstructorUtil.isSuperConstructorCall(st.getExpression()))
          .findFirst()
          .ifPresent(st -> st.delete());
      }
      ConstructorSimplifier ctorSimplifier = RedundantRecordConstructorInspection.createCtorSimplifier(canonicalCtor);
      if (ctorSimplifier != null) {
        ctorSimplifier.simplify(canonicalCtor);
      }
    }
  }
private static void tryToCompactCanonicalCtor(@NotNull PsiClass record)