This is an automated email from the ASF dual-hosted git repository. He-Pin pushed a commit to branch fix-stage-actor-warning-space in repository https://gitbox.apache.org/repos/asf/pekko.git
commit 05da04bc339fa7ae22e571928780297d1be5efc4 Author: He-Pin <[email protected]> AuthorDate: Wed Jun 3 11:52:25 2026 +0800 fix: add missing space in StageActor PoisonPill/Kill warning message Motivation: The warning message logged when PoisonPill or Kill is sent to a StageActor was missing a space between the period and the next sentence, resulting in "...not a real Actor.Use a custom..." instead of "...not a real Actor. Use a custom...". Modification: Add the missing space after the period in the warning message in GraphStage.scala, and after the comma in the corresponding test regex in StageActorRefSpec.scala. Result: Warning message reads correctly: "...not a real Actor. Use a custom message type to communicate with it instead." Tests: - sbt "stream-tests / Test / testOnly org.apache.pekko.stream.scaladsl.StageActorRefSpec" — 8/8 References: None - minor formatting fix --- .../test/scala/org/apache/pekko/stream/scaladsl/StageActorRefSpec.scala | 2 +- stream/src/main/scala/org/apache/pekko/stream/stage/GraphStage.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/StageActorRefSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/StageActorRefSpec.scala index 372e98f3ea..c57068397d 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/StageActorRefSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/StageActorRefSpec.scala @@ -166,7 +166,7 @@ class StageActorRefSpec extends StreamSpec with ImplicitSender { stageRef ! PoisonPill // should log a warning, and NOT stop the stage. val actorName = """StageActorRef-[\d+]""" val expectedMsg = - s"[PoisonPill|Kill] message sent to StageActorRef($actorName) will be ignored,since it is not a real Actor. " + + s"[PoisonPill|Kill] message sent to StageActorRef($actorName) will be ignored, since it is not a real Actor. " + "Use a custom message type to communicate with it instead." expectMsgPF(1.second, expectedMsg) { case Logging.Warning(_, _, msg) => expectedMsg.r.pattern.matcher(msg.toString).matches() diff --git a/stream/src/main/scala/org/apache/pekko/stream/stage/GraphStage.scala b/stream/src/main/scala/org/apache/pekko/stream/stage/GraphStage.scala index 5e1aec586c..20cd0d3615 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/stage/GraphStage.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/stage/GraphStage.scala @@ -223,7 +223,7 @@ object GraphStageLogic { val f: (ActorRef, Any) => Unit = { case (_, m @ (PoisonPill | Kill)) => materializer.logger.warning( - "{} message sent to StageActor({}) will be ignored, since it is not a real Actor." + + "{} message sent to StageActor({}) will be ignored, since it is not a real Actor. " + "Use a custom message type to communicate with it instead.", m, functionRef.path) --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
