mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[wpiutil] Remove RuntimeDetector and simplify RuntimeLoader (#6600)
This commit is contained in:
@@ -11,16 +11,12 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||
/** WPIMath JNI. */
|
||||
public final class WPIMathJNI {
|
||||
static boolean libraryLoaded = false;
|
||||
static RuntimeLoader<WPIMathJNI> loader = null;
|
||||
|
||||
static {
|
||||
if (Helper.getExtractOnStaticLoad()) {
|
||||
try {
|
||||
loader =
|
||||
new RuntimeLoader<>(
|
||||
"wpimathjni", RuntimeLoader.getDefaultExtractionRoot(), WPIMathJNI.class);
|
||||
loader.loadLibrary();
|
||||
} catch (IOException ex) {
|
||||
RuntimeLoader.loadLibrary("wpimathjni");
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
System.exit(1);
|
||||
}
|
||||
@@ -37,10 +33,7 @@ public final class WPIMathJNI {
|
||||
if (libraryLoaded) {
|
||||
return;
|
||||
}
|
||||
loader =
|
||||
new RuntimeLoader<>(
|
||||
"wpimathjni", RuntimeLoader.getDefaultExtractionRoot(), WPIMathJNI.class);
|
||||
loader.loadLibrary();
|
||||
RuntimeLoader.loadLibrary("wpimathjni");
|
||||
libraryLoaded = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user