Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
May 15, 2023

Conversation

bdferris-v2
Copy link
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!

  • Run the unit tests with gradle test to make sure you didn't break anything
  • Format the title like "feat: [new feature short description]". Title must follow the Conventional Commit Specification(https://www.conventionalcommits.org/en/v1.0.0/).
  • Linked all relevant issues
  • Include screenshot(s) showing how this pull request works and fixes the issue(s)

@@ -6,6 +6,7 @@ dependencies {
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
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
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
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