Skip to content

fix: Use correct import for @Nullable annotation.#1438

Merged
bdferris-v2 merged 2 commits intomasterfrom
issue/1324/nullable
May 15, 2023
Merged

fix: Use correct import for @Nullable annotation.#1438
bdferris-v2 merged 2 commits intomasterfrom
issue/1324/nullable

Conversation

@bdferris-v2
Copy link
Copy Markdown
Collaborator

I accidentally included the wrong @nullable annotation on a new class (used org.jetbrains.annotations.Nullable when I should have used javax.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!

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'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: why do we need to import this library?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions
Copy link
Copy Markdown
Contributor

✅ Rule acceptance tests passed.
New Errors: 0 out of 1427 datasets (~0%) are invalid due to code change, which is less than the provided threshold of 1%.
Dropped Errors: 0 out of 1427 datasets (~0%) are invalid due to code change, which is less than the provided threshold of 1%.
New Warnings: 0 out of 1427 datasets (~0%) are invalid due to code change, which is less than the provided threshold of 1%.
Dropped Warnings: 0 out of 1427 datasets (~0%) are invalid due to code change, which is less than the provided threshold of 1%.
0 out of 1427 sources (~0 %) are corrupted.
Commit: 91d3316
Download the full acceptance test report here (report will disappear after 90 days).
✅ Rule acceptance tests passed.

@bdferris-v2 bdferris-v2 merged commit 7f0b4c1 into master May 15, 2023
@bdferris-v2 bdferris-v2 deleted the issue/1324/nullable branch May 15, 2023 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants