Skip to content

Commit

Permalink
chore: fix failed in StreamConvertersSpec (apache#1655) (apache#1656)
Browse files Browse the repository at this point in the history
(cherry picked from commit def84bf)
  • Loading branch information
He-Pin authored Dec 31, 2024
1 parent eb22d8d commit 5572049
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import java.util.stream.BaseStream
import java.util.stream.Collector
import java.util.stream.Collector.Characteristics
import java.util.stream.Collectors
import java.util.{ Spliterator, Spliterators }

import scala.concurrent.Await
import scala.concurrent.duration._
Expand Down Expand Up @@ -111,7 +112,7 @@ class StreamConvertersSpec extends StreamSpec with DefaultTimeout {
override def parallel(): EmptyStream = this
override def isParallel: Boolean = false

override def spliterator(): util.Spliterator[Unit] = ???
override def spliterator(): util.Spliterator[Unit] = Spliterators.emptySpliterator()
override def onClose(closeHandler: Runnable): EmptyStream = ???

override def iterator(): util.Iterator[Unit] = new util.Iterator[Unit] {
Expand All @@ -136,7 +137,10 @@ class StreamConvertersSpec extends StreamSpec with DefaultTimeout {
override def parallel(): FailingStream = this
override def isParallel: Boolean = false

override def spliterator(): util.Spliterator[Unit] = ???
override def spliterator(): util.Spliterator[Unit] = Spliterators.spliteratorUnknownSize(
iterator(),
Spliterator.NONNULL
)
override def onClose(closeHandler: Runnable): FailingStream = ???

override def iterator(): util.Iterator[Unit] = new util.Iterator[Unit] {
Expand Down

0 comments on commit 5572049

Please sign in to comment.