void ( @NotNull PsiMethodCallExpression expression) { super.visitMethodCallExpression(expression); final PsiReferenceExpression methodExpression = expression.getMethodExpression(); final String methodName = methodExpression.getReferenceName(); @NonNls final String getenv = "getenv"; if (!getenv.equals(methodName)) { return; } final PsiMethod method = expression.resolveMethod(); if (method == null) { return; } final PsiParameterList parameterList = method.getParameterList(); if (parameterList.getParametersCount() != 1) { return; } final PsiParameter[] parameters = parameterList.getParameters(); final PsiType parameterType = parameters[0].getType(); if (!TypeUtils.isJavaLangString(parameterType)) { return; } final PsiClass aClass = method.getContainingClass(); if (aClass == null) { return; } final String className = aClass.getQualifiedName(); if (!"java.lang.System".equals(className)) { return; } registerMethodCallError(expression); }