Github user neykov commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/196#discussion_r67031965
  
    --- Diff: 
core/src/main/java/org/apache/brooklyn/core/catalog/internal/CatalogBomScanner.java
 ---
    @@ -268,7 +268,7 @@ private void addLibraryDetails(Bundle bundle, 
Map<String, Object> catalog) {
     
             private String readBom(URL bom) {
                 try (final InputStream ins = bom.openStream()) {
    -                return Streams.readFullyString(ins);
    +                return Streams.readFullyStringAndClose(ins);
    --- End diff --
    
    Haven't noticed that, will revert.
    Yes, my thinking was that it doesn't really make sense to keep the stream 
open after reading it fully. I've updated the javadoc to encourage the usage of 
xxxAndClose alternatives. Only very specific cases will need to keep it 
unclosed.


---
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.
---

Reply via email to