smartystreets / smartystreets-java-sdk

The official client libraries for accessing SmartyStreets APIs from Java (and JRE-based languages)
https://smartystreets.com/docs/sdk/java
14 stars 18 forks source link

NullPointerException in client.send #52

Closed bhelm-zoccam closed 2 months ago

bhelm-zoccam commented 2 months ago

I upgraded from v3.13.15 to v3.17.5 and started seeing NullPointerExceptions. Looks similar to issue #45, but I would have expected that to be closed since fixed last March, although I didn't see anything tying closed issues to the release that has the fix. So, this could be a new failure. I am passing a Lookup with a user-entered address, but they look valid. My workaround was to go back to v3.13.15.

Partial stack trace:

java.lang.NullPointerException at com.smartystreets.api.us_street.Client.send(Client.java:51) at com.smartystreets.api.us_street.Client.send(Client.java:27) at com.zoccam.location.services.SmartyStreetsService.callSmartyStreets(SmartyStreetsService.java:68)

RyanLCox1 commented 2 months ago

I've added a fix for the null pointer exception in the latest version. 3.18.1

There may be another issue that isn't being surfaced though that is causing the response to be null. This will at least not throw a null pointer exception now. You will probably need to debug why the response is null in some cases though.