Skip to content

Commit

Permalink
Issue #411
Browse files Browse the repository at this point in the history
  • Loading branch information
gondor committed Jul 15, 2015
1 parent 8ead0c2 commit 6d4f276
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.openstack4j.openstack.storage.object.internal;

import static org.openstack4j.core.transport.HttpEntityHandler.closeQuietly;

import org.openstack4j.api.types.ServiceType;
import org.openstack4j.core.transport.HttpResponse;
import org.openstack4j.openstack.internal.BaseOpenStackService;
Expand All @@ -20,6 +22,10 @@ protected boolean isResponseSuccess(HttpResponse res, int status) {
}

protected boolean isResponseSuccess(HttpResponse res, int status, boolean closeResponse) {
return res.getStatus() == status;
boolean result = res.getStatus() == status;
if (closeResponse) {
closeQuietly(res);
}
return result;
}
}

0 comments on commit 6d4f276

Please sign in to comment.