void ( @NotNull PsiNewExpression expression) { super.visitNewExpression(expression); final PsiJavaCodeReferenceElement reference = expression.getClassReference(); if (reference == null) { return; } final PsiElement element = reference.resolve(); if (!(element instanceof PsiClass aClass)) { return; } if (!InheritanceUtil.isInheritor(aClass, "java.util.Random")) { return; } final String qualifiedName = aClass.getQualifiedName(); if ("java.security.SecureRandom".equals(qualifiedName)) { return; } registerError(reference, reference); }