title: Why is BufferedReader not closed when obtaining `Stream<String>` in try-with-resources?
body: <p>The reader should be closed when a <code>Stream</code> is used in a try-with-resources.</p>
  
  <p>Given this:</p>
  
  <pre><code>try(Stream&lt;String&gt; lines = new BufferedReader(reader).lines()) {
              return lines.map(it -&gt; trim ? it.trim() : it)
                      .collect(Collectors.toList());
  }
  </code></pre>
  
  <p>... the reader is not being closed??</p>
  
  <p>This test fails:</p>
  
  <pre><code>    AtomicBoolean closed = new AtomicBoolean(false);
  
      Reader r = new StringReader("  Line1 \n Line2") {
  
                  @Override
                  public void close() {
                      super.close();
                      closed.set(true);
                  }
  
              };
  
      try(Stream&lt;String&gt; lines = new BufferedReader(r).lines()) {
              lines.map(it -&gt; trim ? it.trim() : it)
                      .collect(Collectors.toList());
      }
  
      assertTrue("Reader was not closed.",closed.get());
  </code></pre>