Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid wildcards, which confuse our nullness checker.
Specifically, wildcards defeat our ability to recognize that `containsKey` guarantees that `get` will return non-null. See https://github.com/jspecify/nullness-checker-for-checker-framework/blob/a13e6921d6e23ec1349be007b5e9a6d1f279c91c/src/main/java/com/google/jspecify/nullness/NullSpecTransfer.java#L603 Without this CL, Auto-Common would break when I submit CL 382342656 to annotate the remaining immutable-map classes. Arguably we should have a specific issue open for this problem, but: - This may be the first time it's come up in practice. - _Everything_ about wildcards in our checker is weird, thanks to a combination of the Checker Framework's unusual handling of them (which they are fixing by implementing capture conversion) and our hacks on top of that (which we hope can go away). (The very general project of "remove our hacks" is tracked by jspecify/checker-framework#4 (comment) and other issues there.) RELNOTES=n/a PiperOrigin-RevId: 382352859
- Loading branch information