mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[build] Upgrade to Java 21 (#7547)
Signed-off-by: Jade Turner <spacey-sooty@proton.me> Co-authored-by: sciencewhiz <sciencewhiz@users.noreply.github.com>
This commit is contained in:
@@ -73,7 +73,7 @@ public class VisionRunner<P extends VisionPipeline> {
|
||||
public void runOnce() {
|
||||
Long id = CameraServerSharedStore.getCameraServerShared().getRobotMainThreadId();
|
||||
|
||||
if (id != null && Thread.currentThread().getId() == id) {
|
||||
if (id != null && Thread.currentThread().threadId() == id) {
|
||||
throw new IllegalStateException(
|
||||
"VisionRunner.runOnce() cannot be called from the main robot thread");
|
||||
}
|
||||
@@ -106,7 +106,7 @@ public class VisionRunner<P extends VisionPipeline> {
|
||||
public void runForever() {
|
||||
Long id = CameraServerSharedStore.getCameraServerShared().getRobotMainThreadId();
|
||||
|
||||
if (id != null && Thread.currentThread().getId() == id) {
|
||||
if (id != null && Thread.currentThread().threadId() == id) {
|
||||
throw new IllegalStateException(
|
||||
"VisionRunner.runForever() cannot be called from the main robot thread");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user