Skip to content

Commit a0a821f

Browse files
committed
remove the temp file on JVM Exit
1 parent 50eeec7 commit a0a821f

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎java/c/src/main/java/org/apache/arrow/c/jni/JniLoader.java‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ private void load(String name) {
8181
final String libraryToLoad = System.mapLibraryName(name);
8282
try {
8383
File temp = File.createTempFile("jnilib-", ".tmp", new File(System.getProperty("java.io.tmpdir")));
84+
temp.deleteOnExit();
8485
try (final InputStream is = JniWrapper.class.getClassLoader().getResourceAsStream(libraryToLoad)) {
8586
if (is == null) {
8687
throw new FileNotFoundException(libraryToLoad);

0 commit comments

Comments
 (0)