void ( @NotNull PsiMethodCallExpression expression) { super.visitMethodCallExpression(expression); final PsiReferenceExpression methodExpression = expression.getMethodExpression(); final String methodName = methodExpression.getReferenceName(); if (!constantMathCall.contains(methodName)) { return; } final PsiExpressionList argumentList = expression.getArgumentList(); final PsiExpression[] arguments = argumentList.getExpressions(); if (arguments.length == 0) { return; } final PsiExpression argument = arguments[0]; final Object argumentValue = ConstantExpressionUtil.computeCastTo(argument, PsiTypes.doubleType()); if (!(argumentValue instanceof Double)) { return; } final double doubleValue = ((Double)argumentValue).doubleValue(); final String valueString = createValueString(methodName, doubleValue); if (valueString == null) { return; } final PsiMethod method = expression.resolveMethod(); if (method == null) { return; } final PsiClass referencedClass = method.getContainingClass(); if (referencedClass == null) { return; } final String className = referencedClass.getQualifiedName(); if (!CommonClassNames.JAVA_LANG_MATH.equals(className) && !CommonClassNames.JAVA_LANG_STRICT_MATH.equals(className)) { return; } registerMethodCallError(expression); }