Skip to content

Commit 2963fd1

Browse files
author
jxiaobin
committed
fixed bug: JaxRs20Connector throws exception if returnType is Void
1 parent 017c1e1 commit 2963fd1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

openstack-client-connectors/jersey2-connector/src/main/java/org/openstack/connector/JaxRs20Connector.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@ public <T> T execute(OpenStackRequest<T> request) {
4141

4242
try {
4343
if (entity != null) {
44-
if (request.returnType() == null) {
44+
if (request.returnType() == null || request.returnType() == Void.class) {
4545
invocation.method(request.method().name(), entity);
4646
} else {
4747
return invocation.method(request.method().name(), entity, request.returnType());
4848
}
4949
} else {
50-
if (request.returnType() == null) {
50+
if (request.returnType() == null || request.returnType() == Void.class) {
5151
invocation.method(request.method().name());
5252
} else {
5353
return invocation.method(request.method().name(), request.returnType());

0 commit comments

Comments
 (0)