mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-29 02:21:44 +00:00
[wpiutil] Remove RuntimeDetector and simplify RuntimeLoader (#6600)
This commit is contained in:
@@ -17,7 +17,6 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||
/** NetworkTables JNI. */
|
||||
public final class NetworkTablesJNI {
|
||||
static boolean libraryLoaded = false;
|
||||
static RuntimeLoader<NetworkTablesJNI> loader = null;
|
||||
|
||||
/** Sets whether JNI should be loaded in the static block. */
|
||||
public static class Helper {
|
||||
@@ -48,10 +47,7 @@ public final class NetworkTablesJNI {
|
||||
static {
|
||||
if (Helper.getExtractOnStaticLoad()) {
|
||||
try {
|
||||
loader =
|
||||
new RuntimeLoader<>(
|
||||
"ntcorejni", RuntimeLoader.getDefaultExtractionRoot(), NetworkTablesJNI.class);
|
||||
loader.loadLibrary();
|
||||
RuntimeLoader.loadLibrary("ntcorejni");
|
||||
} catch (IOException ex) {
|
||||
ex.printStackTrace();
|
||||
System.exit(1);
|
||||
@@ -69,10 +65,7 @@ public final class NetworkTablesJNI {
|
||||
if (libraryLoaded) {
|
||||
return;
|
||||
}
|
||||
loader =
|
||||
new RuntimeLoader<>(
|
||||
"ntcorejni", RuntimeLoader.getDefaultExtractionRoot(), NetworkTablesJNI.class);
|
||||
loader.loadLibrary();
|
||||
RuntimeLoader.loadLibrary("ntcorejni");
|
||||
libraryLoaded = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user