From 18e98d4e389631fd25f549131f70f0938ad26b93 Mon Sep 17 00:00:00 2001 From: "He-Pin(kerr)" Date: Fri, 10 Jan 2025 19:16:01 +0800 Subject: [PATCH] chore: Require breadth >= 1 in FlattenMerge (#1699) --- .../org/apache/pekko/stream/impl/fusing/StreamOfStreams.scala | 1 + 1 file changed, 1 insertion(+) diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/StreamOfStreams.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/StreamOfStreams.scala index 8b536f7357..2195328ba5 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/StreamOfStreams.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/StreamOfStreams.scala @@ -46,6 +46,7 @@ import pekko.util.ccompat.JavaConverters._ */ @InternalApi private[pekko] final class FlattenMerge[T, M](val breadth: Int) extends GraphStage[FlowShape[Graph[SourceShape[T], M], T]] { + require(breadth >= 1, "breadth should >= 1") private val in = Inlet[Graph[SourceShape[T], M]]("flatten.in") private val out = Outlet[T]("flatten.out")