Annotate the remaining public classes under collect for nullness.#5664
Closed
copybara-service[bot] wants to merge 1 commit into
Closed
Annotate the remaining public classes under collect for nullness.#5664copybara-service[bot] wants to merge 1 commit into
collect for nullness.#5664copybara-service[bot] wants to merge 1 commit into
Conversation
And fix the annotations on the `paddedPartition` methods: I had annotated them as returning a series of lists of `T`, but in fact they return a series of lists of `@Nullable T`. We got away with this because of a combination of: - an unncessary cast to `List<T>` in `Iterators.paddedPartition` - a bug in our nullness checker that permits a cast from `List<@nullable T>` to `List<T>` without warning I was going to say that I suspected that the bug is fundamentally the same bug as b/192579700. (Regardless, I'll try to add a sample input for both this problem and b/192579700 so that we can eventually work toward fixing both.) But from glancing at how I originally annotated this file when I was using the stock Checker Framework back in 2019, I get the impression that even it may have somehow missed this. If so, I'll ideally also report the problem upstream. Finally, I'll note that this CL includes tiny steps toward addressing #989 (particularly the part reported as #1015), albeit only inside implementation code. RELNOTES=n/a PiperOrigin-RevId: 384698326
71138fb to
3a86a13
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Annotate the remaining public classes under
collectfor nullness.And fix the annotations on the
paddedPartitionmethods: I had annotated them as returning a series of lists ofT, but in fact they return a series of lists of@Nullable T. We got away with this because of a combination of:List<T>inIterators.paddedPartitionList<@Nullable T>toList<T>without warningI was going to say that I suspected that the bug is fundamentally the same bug as b/192579700. (Regardless, I'll try to add a sample input for both this problem and b/192579700 so that we can eventually work toward fixing both.) But from glancing at how I originally annotated this file when I was using the stock Checker Framework back in 2019, I get the impression that even it may have somehow missed this. If so, I'll ideally also report the problem upstream.
Finally, I'll note that this CL includes tiny steps toward addressing #989 (particularly the part reported as #1015), albeit only inside implementation code.
RELNOTES=n/a