Skip to content

Commit 803f241

Browse files
fix runtime type error
1 parent aef7585 commit 803f241

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

luceedebug/src/main/java/luceedebug/coreinject/LuceeVm.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -958,7 +958,10 @@ private void continue_(ThreadReference threadRef) {
958958
public void continueAll() {
959959
// avoid concurrent modification exceptions, calling continue_ mutates `suspendedThreads`
960960
Arrays
961-
.asList(suspendedThreads.toArray(size -> new Long[size]))
961+
// TODO: Set<T>.toArray(sz -> new T[sz]) is not typesafe, changing the type of Set<T>
962+
// doesn't flow through into the toArray call. Is there a more idiomatic, typesafe way to do
963+
// this?
964+
.asList(suspendedThreads.toArray(size -> new JdwpThreadID[size]))
962965
.forEach(jdwpThreadID -> continue_(jdwpThreadID));
963966
}
964967

0 commit comments

Comments
 (0)