fix: Use correct import for @Nullable annotation.#1438
Conversation
| annotationProcessor 'com.google.auto.value:auto-value:1.7.4' | ||
| compileOnly 'com.google.auto.value:auto-value-annotations:1.7.4' | ||
| implementation 'org.jetbrains:annotations:20.1.0' | ||
| implementation 'com.google.code.findbugs:jsr305:3.0.2' |
There was a problem hiding this comment.
question: why do we need to import this library?
There was a problem hiding this comment.
The @nullable annotation is not included in the JDK by default so it has to be included via a dependency. com.google.code.findbugs:jsr305 is actually where we've been getting this annotation in core and main, but it was a transitive dependency via com.google.guava:guava. Since model doesn't need Guava, I just imported the dependency directly.
|
✅ Rule acceptance tests passed. |
I accidentally included the wrong @nullable annotation on a new class (used
org.jetbrains.annotations.Nullablewhen I should have usedjavax.annotation.Nullable). We should be consistent with the rest of the codebase.Please make sure these boxes are checked before submitting your pull request - thanks!
gradle testto make sure you didn't break anything