]> source.dussan.org Git - jgit.git/commit
RepositorySetupWorkDirTest: Fix "resource leak" warnings 46/64946/1
authorDavid Pursehouse <david.pursehouse@sonymobile.com>
Fri, 22 Jan 2016 05:21:15 +0000 (14:21 +0900)
committerDavid Pursehouse <david.pursehouse@sonymobile.com>
Fri, 22 Jan 2016 05:21:15 +0000 (14:21 +0900)
commitddcbd22cd376754fed73ae1824b924ff5403380d
treee9671ee15ce9afbbdb093e9afdefdda25f4af743
parent20c2079f70c0150dcda105a6952a73b57c2c4f6a
RepositorySetupWorkDirTest: Fix "resource leak" warnings

Use FileRepositoryBuilder to create the Repository, except in cases
where the creation was already in a try-block. Convert those to use
a try-with-resource.

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