Skip to content

Commit

Permalink
Use old API to fix compilation error
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellansun committed Sep 28, 2023
1 parent 2730378 commit 0db1953
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Locale;
import java.util.Objects;
Expand Down Expand Up @@ -135,9 +136,10 @@ public static List<Thread> allThreads(Thread self) {
threads = new Thread[threads.length * 2];
}

return Arrays.stream(threads)
.filter(Objects::nonNull)
.collect(Collectors.toUnmodifiableList());
return Collections.unmodifiableList(
Arrays.stream(threads)
.filter(Objects::nonNull)
.collect(Collectors.toList()));
}

/**
Expand Down

0 comments on commit 0db1953

Please sign in to comment.