`WeakReference`, etc.: Avoid `@Nullable` on constructor parameter?
Open
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 7
- Forks
- 3
- Avg merge
- 15h 17m
- Merged PRs (30d)
- 8
Description
I suspect that we'll want to keep it, but I want to collect together related discussions:
- In https://github.com/typetools/checker-framework/pull/3029#discussion_r363133687, we discussed that it's weird but that lots of people do pass
null. - I don't know if it came up there, but I think I learned later that
new WeakReference<>(null)never gets enqueued, which actually seems fairly scary? - Kotlin/Native has an (experimental)
WeakReferencewhose constructor doesn't allownull—hence https://github.com/google/xplat/commit/5cb35dbd607fed35f95153224b54ce6bb469bf12, I assume.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the WeakReference constructor question and the linked Checker Framework discussion and Kotlin/Native constructor reference. The issue is complete when the project reaches a decision on whether the constructor should permit null and records the rationale for keeping or removing @Nullable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100