-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
When I delete an entity, for example a customer mandate, handling the response throws a NullPointerException.
java.lang.NullPointerException
at nl.stil4m.mollie.RequestExecutor.deserialize(RequestExecutor.java:43)
at nl.stil4m.mollie.RequestExecutor.lambda$execute$0(RequestExecutor.java:34)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:222)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:164)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:139)
at nl.stil4m.mollie.RequestExecutor.execute(RequestExecutor.java:30)
at nl.stil4m.mollie.concepts.AbstractConcept.requestVoid(AbstractConcept.java:70)
at nl.stil4m.mollie.concepts.Delete.delete(Delete.java:12)
....
The reason is that the RequestExecutor tries to deserialise the response entity of a response with status 204 No Content
. The following line fails because response.getEntity()
is null
:
https://github.com/stil4m/mollie-api/blob/2.7.0/src/main/java/nl/stil4m/mollie/RequestExecutor.java#L43
Metadata
Metadata
Assignees
Labels
No labels