Skip to content

Commit 299c192

Browse files
ctruedengab1one
authored andcommitted
FileHandle: fix double-checked locking
1 parent f2a3e00 commit 299c192

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main/java/org/scijava/io/FileHandle.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ private RandomAccessFile raf() throws IOException {
284284
}
285285

286286
private synchronized void initRAF() throws IOException {
287+
if (raf != null) return;
287288
raf = new RandomAccessFile(get().getFile(), getMode());
288289
}
289290

0 commit comments

Comments
 (0)