Github user sjcorbett commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/121#discussion_r16420159
--- Diff: usage/test-support/src/main/java/brooklyn/test/HttpTestUtils.java
---
@@ -300,13 +366,26 @@ public static String getContent(String url) {
});
}
- // TODO Part-duplicated from jclouds Throwables2
- @SuppressWarnings("unchecked")
- private static <T extends Throwable> T
getFirstThrowableOfType(Throwable from, Class<T> clazz) {
- try {
- return (T) find(getCausalChain(from), instanceOf(clazz));
- } catch (NoSuchElementException e) {
- return null;
- }
+ /**
+ * Consumes the input stream entirely and then cleanly closes the
connection.
+ * Ignores all exceptions completely, not even logging them!
+ *
+ * Consuming the stream fully is useful for preventing idle TCP
connections.
+ * See {@linkplain
}http://docs.oracle.com/javase/8/docs/technotes/guides/net/http-keepalive.html}.
--- End diff --
Too many `}`s
---
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.
---