]> source.dussan.org Git - jgit.git/commit
FileRepositoryBuilderTest: Don't explicitly close BufferedWriter in try-with-resource 63/130063/1
authorDavid Pursehouse <david.pursehouse@gmail.com>
Thu, 27 Sep 2018 09:01:03 +0000 (18:01 +0900)
committerDavid Pursehouse <david.pursehouse@gmail.com>
Thu, 27 Sep 2018 09:01:03 +0000 (18:01 +0900)
commitb2ee02f53b75f1358f5784d60880f5a4be9a1d72
tree8d3d7ed939dd7b13329ba54b82856b2d70a8423c
parentfa61fd6f61de2ff997c791154bbaf1dc00ee96b9
FileRepositoryBuilderTest: Don't explicitly close BufferedWriter in try-with-resource

The BufferedWriter is opened in a try-with-resource and thus will be
automatically closed.

Presumably the close was added to make sure it is closed before the
subsequent test statements are executed. Instead of explicitly closing
it, let the try-with-resource automatically close it, and move the
subsequent statements out of the try-block.

Change-Id: If5fada2f580ef9cbaad3a0b9216b5200b917781a
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/FileRepositoryBuilderTest.java