diff --git a/java/dagger/lint/DaggerKotlinIssueDetector.kt b/java/dagger/lint/DaggerKotlinIssueDetector.kt index 8ca862309e6..6a4a33ca62f 100644 --- a/java/dagger/lint/DaggerKotlinIssueDetector.kt +++ b/java/dagger/lint/DaggerKotlinIssueDetector.kt @@ -204,7 +204,8 @@ class DaggerKotlinIssueDetector : Detector(), SourceCodeScanner { ) { val containingClass = node.containingClass?.toUElement(UClass::class.java) ?: return if (containingClass.isObject()) { - val annotation = node.findAnnotation(JVM_STATIC_ANNOTATION)!! + val annotation = node.findAnnotation(JVM_STATIC_ANNOTATION) + ?: node.javaPsi.modifierList.findAnnotation(JVM_STATIC_ANNOTATION)!! context.report( ISSUE_JVM_STATIC_PROVIDES_IN_OBJECT, context.getLocation(annotation),