He-Pin commented on code in PR #3263:
URL: https://github.com/apache/pekko/pull/3263#discussion_r3488195280


##########
actor/src/main/scala/org/apache/pekko/event/Logging.scala:
##########
@@ -2000,10 +2000,13 @@ class MarkerLoggingAdapter(
     }
   }
 
-  // Copy of LoggingAdapter.format1 due to binary compatibility restrictions
+  // Copy of LoggingAdapter.format1 due to binary compatibility restrictions.
+  // The array branches must spread the elements as varargs (`: _*`) so that 
each element is
+  // expanded into its own template placeholder; without it the whole 
IndexedSeq would be passed
+  // as a single argument and rendered as e.g. "ArraySeq(a, b, c)" (issue 
#3257).
   private def format1(t: String, arg: Any): String = arg match {
-    case a: Array[?] if !a.getClass.getComponentType.isPrimitive => format(t, 
a.toIndexedSeq)
-    case a: Array[?]                                             => format(t, 
a.toIndexedSeq.asInstanceOf[IndexedSeq[AnyRef]])
+    case a: Array[?] if !a.getClass.getComponentType.isPrimitive => format(t, 
a.toIndexedSeq: _*)

Review Comment:
   Not sure if it's safe to change ,let's defer this.



-- 
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