BaseInspectionVisitor () { return new BaseInspectionVisitor() { @Override public void visitMethodCallExpression( @NotNull PsiMethodCallExpression expression) { super.visitMethodCallExpression(expression); if (!THREAD_LOCAL_SET.test(expression)) { return; } PsiExpression[] arguments = expression.getArgumentList().getExpressions(); if (arguments.length != 1) { return; } PsiExpression firstArgument = PsiUtil.skipParenthesizedExprDown(arguments[0]); if (firstArgument == null) { return; } if (!(firstArgument instanceof PsiLiteralExpression literalExpression)) { return; } if (!ExpressionUtils.isNullLiteral(literalExpression)) { return; } PsiExpression qualifierExpression = expression.getMethodExpression().getQualifierExpression(); if (qualifierExpression == null) { return; } registerMethodCallError(expression); } }; }