]> source.dussan.org Git - jgit.git/commit
Ensure DirectoryStream is closed promptly 06/115006/1
authorDave Borowitz <dborowitz@google.com>
Fri, 5 Jan 2018 18:02:47 +0000 (13:02 -0500)
committerDave Borowitz <dborowitz@google.com>
Fri, 5 Jan 2018 18:02:47 +0000 (13:02 -0500)
commit1c16ea4601920c9dbc7a0202efc20137e1a63d55
treeb95f9bc9a86aa11fa4a00546258f6a1d4d068df7
parentcdc88247b9aabade23db90dbc3541eda989957f4
Ensure DirectoryStream is closed promptly

From the javadoc for Files.list:

"The returned stream encapsulates a DirectoryStream. If timely disposal
of file system resources is required, the try-with-resources construct
should be used to ensure that the stream's close method is invoked
after the stream operations are completed."

This is the only call to Files#newDirectoryStream that is not already in
a try-with-resources.

Change-Id: I91e6c56b5d74e8435457ad6ed9e6b4b24d2aa14e
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java