Copilot commented on code in PR #2916:
URL: https://github.com/apache/pekko/pull/2916#discussion_r3200481542


##########
stream/src/main/scala/org/apache/pekko/stream/impl/fusing/ActorGraphInterpreter.scala:
##########
@@ -538,24 +533,22 @@ import org.reactivestreams.Subscription
     override def cancel(): Unit = ()
   }
 
-  // can't be final because of SI-4440
-  case class ResumeShell(shell: GraphInterpreterShell) extends BoundaryEvent {
+  final class ResumeShell(override val shell: GraphInterpreterShell) extends 
BoundaryEvent {
     override def execute(eventLimit: Int): Int =
-      if (!waitingForShutdown) {
-        if (GraphInterpreter.Debug) println(s"${interpreter.Name}  resume")
-        if (interpreter.isSuspended) runBatch(eventLimit) else eventLimit
+      if (!shell.waitingForShutdown) {
+        if (GraphInterpreter.Debug) println(s"${shell.interpreter.Name}  
resume")
+        if (shell.interpreter.isSuspended) shell.runBatch(eventLimit) else 
eventLimit
       } else eventLimit
 
     override def cancel(): Unit = ()
   }
 
-  // can't be final because of SI-4440
-  case class Abort(shell: GraphInterpreterShell) extends BoundaryEvent {
+  final class Abort(override val shell: GraphInterpreterShell) extends 
BoundaryEvent {
     override def execute(eventLimit: Int): Int = {
-      if (waitingForShutdown) {
-        subscribesPending = 0
-        val subscriptionTimeout = 
attributes.mandatoryAttribute[ActorAttributes.StreamSubscriptionTimeout].timeout
-        tryAbort(
+      if (shell.waitingForShutdown) {
+        shell.subscribesPending = 0
+        val subscriptionTimeout = 
shell.attributes.mandatoryAttribute[ActorAttributes.StreamSubscriptionTimeout].timeout
+        shell.tryAbort(
           new TimeoutException(
             "Streaming actor has been already stopped processing (normally), 
but not all of its " +
             s"inputs or outputs have been subscribed in 
[$subscriptionTimeout}]. Aborting actor now."))

Review Comment:
   The TimeoutException message has a stray `}` in the interpolated timeout 
("[$subscriptionTimeout}]") which will show up in logs/exceptions. It looks 
like a typo; consider changing it to "[$subscriptionTimeout]" so the message 
renders correctly.
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to