void ( @NotNull PsiNewExpression newExpression) { super.visitNewExpression(newExpression); final PsiType type = newExpression.getType(); if (type == null) { return; } if (!(type instanceof PsiClassType classType)) { return; } @NonNls final String className = classType.getCanonicalText(); if (!className.startsWith("sun.")) { return; } registerNewExpressionError(newExpression); }