Skip to content

Conversation

@etff
Copy link
Contributor

@etff etff commented Mar 16, 2024

Found and fixed an issue where Response.protocolVersion may have caused NullPointerExceptions. #2314

I believe Response builder already defaults to ProtocolVersion.HTTP_1_1
and using it when the protocolVersion argument is null.

I have other ideas:

  • Create another enum value UNKNOWN based on Logger.java and use it when protocolVersion argument is null.
  • Leave the current code as is and handle the NullPointerException when Response is used.

If you encounter any difficulties with this change, I'd appreciate some guidance or direction.

@etff etff changed the title fix: set Response.protocolVersion default value fix: Response.protocolVersion may caused NPE Mar 16, 2024
@etff etff changed the title fix: Response.protocolVersion may caused NPE fix: Response.protocolVersion may cause NPE Mar 16, 2024
@velo velo merged commit ba3ecbf into OpenFeign:master Mar 16, 2024
velo pushed a commit that referenced this pull request Oct 7, 2024
* fix: set Response.protocolVersion default value

* refactor: add default protocol version field

* refactor: change to default protocol version value using builder field.
velo pushed a commit that referenced this pull request Oct 8, 2024
* fix: set Response.protocolVersion default value

* refactor: add default protocol version field

* refactor: change to default protocol version value using builder field.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants