diff --git a/java/dagger/lint/DaggerKotlinIssueDetector.kt b/java/dagger/lint/DaggerKotlinIssueDetector.kt index 8ca862309e6..2c180eeee11 100644 --- a/java/dagger/lint/DaggerKotlinIssueDetector.kt +++ b/java/dagger/lint/DaggerKotlinIssueDetector.kt @@ -200,7 +200,7 @@ class DaggerKotlinIssueDetector : Detector(), SourceCodeScanner { override fun visitMethod(node: UMethod) { if (!node.isConstructor && node.hasAnnotation(PROVIDES_ANNOTATION) && - node.hasAnnotation(JVM_STATIC_ANNOTATION) + node.findAnnotation(JVM_STATIC_ANNOTATION) != null ) { val containingClass = node.containingClass?.toUElement(UClass::class.java) ?: return if (containingClass.isObject()) {