palantir / palantir/conjure-java
Bean map fields should not allow null values
Open
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 39
- Forks
- 49
- Avg merge
- 8h 22m
- Merged PRs (30d)
- 32
Description
What happened?
MapExample.builder().items("foo", null).build() produces MapExample{items: {foo=null}}
What did you want to happen?
I expected a SafeNullPointerException("value cannot be null") to be thrown
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
Reproduce the issue with the MapExample.builder() call shown in the report, then locate the generated map-field builder and existing null-validation behavior. Confirm the expected SafeNullPointerException message and add coverage for a null map value; done means the example no longer builds with null values and the test passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend-api-design
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100