Github user aledsage commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/730#discussion_r33762304
--- Diff:
usage/rest-client/src/main/java/brooklyn/util/http/BuiltResponsePreservingError.java
---
@@ -62,7 +64,8 @@ public BuiltResponsePreservingError(int status,
Headers<Object> headers, Object
Exceptions.propagateIfFatal(e);
return new BuiltResponsePreservingError(status, headers,
entity, new Annotation[0], e);
} finally {
- source.close();
+ if (source instanceof BaseClientResponse)
--- End diff --
Why only call `close()` if it's an instance of `BaseClientResponse`? The
close method is on `javax.ws.rs.core.Response`, so should we always call close?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---