ShipEngine / shipengine-java

The official Java SDK for ShipEngine API
https://www.shipengine.com/docs/
Apache License 2.0
1 stars 1 forks source link

Fix issue #19 #21

Closed ducnh298 closed 2 years ago

ducnh298 commented 2 years ago

Issue #19 Your response return Map<String, String+ArrayList>:

unknown

In src/main/java/com/shipengine/InternalClient.java func checkResponseForErrors( ) you initiate a Map<String, ArrayList> to get that response:

11unk11nown

then this ClassCastException's thrown (should be ShipengineException)

class java.lang.String cannot be cast to class java.util.ArrayList (java.lang.String and java.util.ArrayList are in module java.base of loader 'bootstrap')

I suggest using Object instead of ArrayList. Work just fine for me.