Skip to content
This repository was archived by the owner on Jul 7, 2023. It is now read-only.

Commit a11e607

Browse files
committed
WINK-373 - Fix NPE when EntityType is null
Patch provided by TERAJIMA Motoyuki git-svn-id: https://svn.apache.org/repos/asf/incubator/wink/trunk@1415943 13f79535-47bb-0310-9956-ffa450edef68
1 parent b45debf commit a11e607

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

wink-client/src/main/java/org/apache/wink/client/internal/ResourceImpl.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,12 @@ public <T> T invoke(String method, Class<T> responseEntity, Object requestEntity
198198

199199
@SuppressWarnings("unchecked")
200200
public <T> T invoke(String method, EntityType<T> responseEntity, Object requestEntity) {
201-
ClientResponse response =
202-
invoke(method, responseEntity.getRawClass(), responseEntity.getType(), requestEntity);
203201
if (responseEntity == null) {
202+
invoke(method, null, null, requestEntity);
204203
return null;
205204
}
205+
ClientResponse response =
206+
invoke(method, responseEntity.getRawClass(), responseEntity.getType(), requestEntity);
206207
if (ClientResponse.class.equals(responseEntity.getRawClass())) {
207208
return (T)response;
208209
}

0 commit comments

Comments
 (0)