Update LoadLibrary.java, pom.xml, and pom.xml
This commit is contained in:
parent
38ccacd18a
commit
2829f8c089
@ -25,6 +25,7 @@ import java.nio.file.Path;
|
|||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
|
import it.tdlight.jni.ObjectsUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The class to load the libraries needed to run Tdlib
|
* The class to load the libraries needed to run Tdlib
|
||||||
@ -144,8 +145,8 @@ public class LoadLibrary {
|
|||||||
}
|
}
|
||||||
InputStream libInputStream;
|
InputStream libInputStream;
|
||||||
try {
|
try {
|
||||||
libInputStream = (InputStream) classForResource.getDeclaredMethod("getLibraryAsStream").invoke(InputStream.class);
|
libInputStream = ObjectsUtils.requireNonNull((InputStream) classForResource.getDeclaredMethod("getLibraryAsStream").invoke(InputStream.class));
|
||||||
} catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException e) {
|
} catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException | NullPointerException e) {
|
||||||
throw new IOException("Native libraries for platform " + os + "-" + arch + " not found!", e);
|
throw new IOException("Native libraries for platform " + os + "-" + arch + " not found!", e);
|
||||||
}
|
}
|
||||||
if (Files.notExists(tempFile)) {
|
if (Files.notExists(tempFile)) {
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<revision>0-SNAPSHOT</revision>
|
<revision>0-SNAPSHOT</revision>
|
||||||
<natives-version>3.0.125</natives-version>
|
<natives-version>3.0.126</natives-version>
|
||||||
</properties>
|
</properties>
|
||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<revision>0-SNAPSHOT</revision>
|
<revision>0-SNAPSHOT</revision>
|
||||||
<natives-version>3.0.125</natives-version>
|
<natives-version>3.0.126</natives-version>
|
||||||
</properties>
|
</properties>
|
||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
|
Loading…
Reference in New Issue
Block a user