Properly close fileoutput stream
This commit is contained in:
parent
7d686cff56
commit
70b4734f3d
|
@ -41,8 +41,8 @@ public class ReqwestUtils {
|
||||||
|
|
||||||
final var cl = ReqwestUtils.class.getClassLoader();
|
final var cl = ReqwestUtils.class.getClassLoader();
|
||||||
|
|
||||||
try (var stream = cl.getResourceAsStream("META-INF/natives/" + native_folder + "/" + arch + "/libreqwest" + extension)) {
|
try (var stream = cl.getResourceAsStream("META-INF/natives/" + native_folder + "/" + arch + "/libreqwest" + extension); var fileOutputStream = new FileOutputStream(nativeFile)) {
|
||||||
stream.transferTo(new FileOutputStream(nativeFile));
|
stream.transferTo(fileOutputStream);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue