Kong / unirest-java

Unirest in Java: Simplified, lightweight HTTP client library.
http://kong.github.io/unirest-java/
MIT License
2.6k stars 594 forks source link

Minor cleanup: make MockClient.defaultResponse not null #418

Closed emystein closed 2 years ago

emystein commented 2 years ago

I've identified that MockClient.defaultResponse can always be set to new Invocation(), avoiding potential NullPointerExceptions.

CLAassistant commented 2 years ago

CLA assistant check
All committers have signed the CLA.

ryber commented 2 years ago

but this is correct, an Invocation is a record of an invocation, a default invocation could or could not exist. You don't have any test documenting when a NPE might happen, can you add some?