Repository navigation
Remove nullness suppression in PTransformReplacements - #40045
Conversation
Drop the class-level @SuppressWarnings({"nullness", "keyfor"}) on PTransformReplacements. The `mainInput` local is now correctly typed @nullable, and the two return sites use Preconditions.checkArgumentNotNull (which has @EnsuresNonNull) so the Checker Framework accepts the returned value as non-null. The "keyfor" suppression was unused. Progress on apache#20507.
|
Assigning reviewers: R: @kennknowles for label java. Note: If you would like to opt out of this review, comment Available commands:
The PR bot will only process comments in the main thread (not review comments). |
|
Reminder, please take a look at this pr: @kennknowles |
|
Assigning new set of reviewers because Pr has gone too long without review. If you would like to opt out of this review, comment R: @ahmedabu98 for label java. Available commands:
|
|
R: @kennknowles |
| return (PCollection<T>) Iterables.getOnlyElement(transform.getOutputs().values()); | ||
| return (PCollection<T>) | ||
| Preconditions.checkArgumentNotNull( | ||
| Iterables.getOnlyElement(transform.getOutputs().values())); |
There was a problem hiding this comment.
I thought it would throw NoSuchElementException if there was nothing.
|
Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control. If you'd like to restart, comment |
Progress on #20507 (sub-task of umbrella #20497).
Drop the class-level
@SuppressWarnings({"nullness", "keyfor"})onPTransformReplacements. ThemainInputlocal is now typed@Nullable,and the two return sites use
Preconditions.checkArgumentNotNull(whichhas
@EnsuresNonNull) so the Checker Framework accepts the returnedvalue as non-null. The
"keyfor"suppression was unused.Verified locally against
sdks:java:core:spotlessJavaCheck,checkstyleMaincompileJava -PenableCheckerFramework(clean rebuild)PTransformReplacementsTest,SingleInputOutputOverrideFactoryTest,MorePipelineTestThank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, commentfixes #<ISSUE NUMBER>instead.CHANGES.mdwith noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)
See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.