`TemporalQuery.queryFrom` should return `@Nullable R`
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 7
- Forks
- 3
- Avg merge
- 15h 17m
- Merged PRs (30d)
- 8
Description
The documentation says "may return null to indicate not found": https://github.com/jspecify/jdk/blob/2ada91bb0cf2f01ce67e1ce046c45322bf836661/src/java.base/share/classes/java/time/temporal/TemporalQuery.java#L143
Also, maybe R shouldn't extends @Nullable Object: https://github.com/jspecify/jdk/blob/2ada91bb0cf2f01ce67e1ce046c45322bf836661/src/java.base/share/classes/java/time/temporal/TemporalQuery.java#L107
since the meaning of a null return value would be ambiguous if R itself is @Nullable.
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 in src/java.base/share/classes/java/time/temporal/TemporalQuery.java at the cited lines 107 and 143. Compare the generic bound, queryFrom return annotation, and documentation to determine how null results should be represented. Done means the declarations and documentation consistently express the agreed nullability semantics.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100