Skip to content

Commit 1b1c662

Browse files
committed
FileHandle: fix double-checked locking
1 parent 9c0a1da commit 1b1c662

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

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

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

0 commit comments

Comments
 (0)