swagger-api / swagger-api/swagger-core
enhancement : prevent ApiResponse#getHeaders from NullPointerException
Open
Nobody has claimed this yet.
backlog
- Dominant language
- Java
- Stars
- 7.5k
- Forks
- 2.3k
- Avg merge
- 18h 1m
- Merged PRs (30d)
- 10
Description
ApiResponse class headers field can be null.
Initialize the headers field with empty Map In order to prevent NullPointerException when calling the ApiResponse#getHeaders.
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
Search the Java source for the ApiResponse class and inspect the headers field and getHeaders() method. Ensure an ApiResponse with no headers can safely call getHeaders() without a NullPointerException, and verify the relevant project tests pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100