File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
zio-process/jvm/src/main/scala/zio/process Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import java.io.OutputStream
2020import scala .jdk .CollectionConverters ._
2121import zio .ZIO
2222import scala .annotation .nowarn
23+ import java .util .stream .Collectors
2324
2425private [process] trait ProcessPlatformSpecific { self : Process =>
2526
@@ -50,7 +51,7 @@ private[process] trait ProcessPlatformSpecific { self: Process =>
5051 */
5152 def killTree : ZIO [Any , CommandError , Unit ] =
5253 self.execute { process =>
53- val d = process.descendants().toList().asScala
54+ val d = process.descendants().collect( Collectors . toList() ).asScala
5455 d.foreach { p =>
5556 destroyHandle(p)
5657 ()
@@ -74,7 +75,7 @@ private[process] trait ProcessPlatformSpecific { self: Process =>
7475 */
7576 def killTreeForcibly : ZIO [Any , CommandError , Unit ] =
7677 self.execute { process =>
77- val d = process.descendants().toList().asScala
78+ val d = process.descendants().collect( Collectors . toList() ).asScala
7879 d.foreach { p =>
7980 destroyForciblyHandle(p)
8081 ()
You can’t perform that action at this time.
0 commit comments