The following code is in nsk/jdi/EventRequestManager/stepRequests/stepreq001t.java:
private static boolean isVirtual(Thread thread) {
try {
Method isVirtual = Thread.class.getMethod("isVirtual");
return (boolean) isVirtual.invoke(thread);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
I think this is a relic from the early days of loom when Thread.isVirtual() was not yet a public method. It can be removed and the callers can call Thread.isVirtual() directly.
private static boolean isVirtual(Thread thread) {
try {
Method isVirtual = Thread.class.getMethod("isVirtual");
return (boolean) isVirtual.invoke(thread);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
I think this is a relic from the early days of loom when Thread.isVirtual() was not yet a public method. It can be removed and the callers can call Thread.isVirtual() directly.