LUCENE-6499: Fix typo and make vars final

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1681851 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Simon Willnauer 2015-05-26 20:36:01 +00:00
parent 9124fcfade
commit b418047251
1 changed files with 4 additions and 4 deletions

View File

@ -107,8 +107,8 @@ public class TestWindowsFS extends MockFileSystemTestCase {
}
public void testOpenDeleteConcurrently() throws IOException, Exception {
Path dir = wrap(createTempDir());
Path file = dir.resolve("thefile");
final Path dir = wrap(createTempDir());
final Path file = dir.resolve("thefile");
final CyclicBarrier barrier = new CyclicBarrier(2);
final AtomicBoolean stopped = new AtomicBoolean(false);
Thread t = new Thread() {
@ -147,10 +147,10 @@ public class TestWindowsFS extends MockFileSystemTestCase {
stream.write(0);
// just create
} catch (FileNotFoundException | NoSuchFileException ex) {
assertEquals("File handle leaked - file is closed but still regeistered", 0, ((WindowsFS) dir.getFileSystem().provider()).openFiles.size());
assertEquals("File handle leaked - file is closed but still registered", 0, ((WindowsFS) dir.getFileSystem().provider()).openFiles.size());
assertFalse("caught FNF on close", opened);
}
assertEquals("File handle leaked - file is closed but still regeistered", 0, ((WindowsFS) dir.getFileSystem().provider()).openFiles.size());
assertEquals("File handle leaked - file is closed but still registered", 0, ((WindowsFS) dir.getFileSystem().provider()).openFiles.size());
Files.deleteIfExists(file);
}
} finally {