He-Pin commented on code in PR #1659: URL: https://github.com/apache/pekko/pull/1659#discussion_r1900318434
########## stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala: ########## @@ -1411,37 +1411,40 @@ private[stream] object Collect { override def preStart(): Unit = buffer = BufferImpl(parallelism, inheritedAttributes) def futureCompleted(result: Try[Out]): Unit = { - def isCompleted = isClosed(in) && todo == 0 inFlight -= 1 result match { - case Success(elem) if elem != null => - if (isAvailable(out)) { - if (!hasBeenPulled(in)) tryPull(in) - push(out, elem) - if (isCompleted) completeStage() - } else buffer.enqueue(elem) - case Success(_) => - if (isCompleted) completeStage() - else if (!hasBeenPulled(in)) tryPull(in) + case Success(elem) => + if (elem != null) { + if (isAvailable(out)) { + push(out, elem) + } else buffer.enqueue(elem) + } Review Comment: We need to update the java/scala doc for the `null` values are dropped. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@pekko.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@pekko.apache.org For additional commands, e-mail: notifications-h...@pekko.apache.org