We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 43594ce commit 67bc02cCopy full SHA for 67bc02c
1 file changed
src/main/java/org/apache/commons/io/RandomAccessFileMode.java
@@ -20,6 +20,7 @@
20
import java.io.FileNotFoundException;
21
import java.io.RandomAccessFile;
22
import java.nio.file.Path;
23
+import java.util.Objects;
24
25
/**
26
* Access modes and factory methods for {@link RandomAccessFile}.
@@ -77,7 +78,7 @@ public RandomAccessFile create(final File file) throws FileNotFoundException {
77
78
* @throws FileNotFoundException See {@link RandomAccessFile#RandomAccessFile(File, String)}.
79
*/
80
public RandomAccessFile create(final Path file) throws FileNotFoundException {
- return create(file.toFile());
81
+ return create(Objects.requireNonNull(file.toFile(), "file"));
82
}
83
84
0 commit comments