TreeWalkJava7Test: Open TreeWalk in try-with-resource
Change-Id: I99a483c482b5395653b0d57b368ec1b5fdba450c Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
This commit is contained in:
parent
06bf69d8ca
commit
62637584d8
|
@ -60,7 +60,7 @@ public void testSymlinkToDirNotRecursingViaSymlink() throws Exception {
|
|||
assertTrue(fs.supportsSymlinks());
|
||||
writeTrashFile("target/data", "targetdata");
|
||||
fs.createSymLink(new File(trash, "link"), "target");
|
||||
TreeWalk tw = new TreeWalk(db);
|
||||
try (TreeWalk tw = new TreeWalk(db)) {
|
||||
tw.setRecursive(true);
|
||||
tw.addTree(new FileTreeIterator(db));
|
||||
assertTrue(tw.next());
|
||||
|
@ -70,3 +70,4 @@ public void testSymlinkToDirNotRecursingViaSymlink() throws Exception {
|
|||
assertFalse(tw.next());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue