You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by GitBox <gi...@apache.org> on 2020/09/11 17:15:33 UTC

[GitHub] [incubator-daffodil] stevedlawrence commented on a change in pull request #417: Correctly expand varargs in String.format call

stevedlawrence commented on a change in pull request #417:
URL: https://github.com/apache/incubator-daffodil/pull/417#discussion_r487180790



##########
File path: daffodil-lib/src/main/scala/org/apache/daffodil/exceptions/Assert.scala
##########
@@ -33,7 +33,7 @@ abstract class ThinException protected (dummy: Int, cause: Throwable, fmt: Strin
   extends Exception(null, cause, false, false) {
 
   private lazy val msg_ =
-    if (fmt ne null) fmt.format(args)
+    if (fmt ne null) fmt.format(args: _*)

Review comment:
       Yeah, I think it's just a genearl issue with varargs. Those functions can accept anything, and it's hard to distinguish between a a single list as being the argument or the individual fields being all the arguments.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org