Repository navigation
Conversation
I'm leaving the `compute*` methods alone until after my pending PRs for those methods.
wmdietl
approved these changes
Jun 19, 2023
wmdietl
left a comment
Collaborator
There was a problem hiding this comment.
Additions look good. I'm not merging, so you can decide whether you want to annotate the compute methods in this PR or separately.
Collaborator
Author
|
OK, I made another pass over the
|
ConcurrentSkipListMap for nullness.ConcurrentSkipListMap.
wmdietl
approved these changes
Jul 12, 2023
wmdietl
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for the detailed description! New changes look good.
cpovirk
added a commit
to cpovirk/jdk
that referenced
this pull request
Jul 12, 2023
Compare jspecify/jdk#19, except that I realized that I missed a `@Nullable` annotation in `compute` in that PR. I've included the annotation here, and I'll send another PR to make the same change in the JSpecify repo.
cpovirk
added a commit
that referenced
this pull request
Jul 12, 2023
Despite what I'd claimed in #19, I didn't make the signatures full match those in `Map`. I discovered this as I was putting together eisop/jdk#51.
cpovirk
added a commit
that referenced
this pull request
Aug 15, 2023
…work and Kotlin do. In contrast, for _`computeIfAbsent`_, I've kept the signature _without_ `@Nullable` on the function result type and method return type. This is far more convenient for most callers, and it just might not cause problems for anyone: Callers of `computeIfAbsent` might _always_ provide a function that elects to insert a value (as expressed by returning a non-null value). I think this gives us the signatures that we'll want for the long term for `Map`, though of course we'd revisit if we chose to include `@PolyNull`. Previously: - #14 (comment) - #19 (comment) Note that this PR excludes `java.util.Properties` because there are a number of other changes that I'm going to make to it (and then upstream).
cpovirk
added a commit
that referenced
this pull request
Aug 15, 2023
…work and Kotlin do. In contrast, for _`computeIfAbsent`_, I've kept the signature _without_ `@Nullable` on the function result type and method return type. This is far more convenient for most callers, and it just might not cause problems for anyone: Callers of `computeIfAbsent` might _always_ provide a function that elects to insert a value (as expressed by returning a non-null value). I think this gives us the signatures that we'll want for the long term for `Map`, though of course we'd revisit if we chose to include `@PolyNull`. Previously: - #14 (comment) - #19 (comment) Note that this PR excludes `java.util.Properties` because there are a number of other changes that I'm going to make to it (and then upstream).
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.
I'm leaving the
compute*methods alone until after my pending PRs forthose methods.