You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by "pjfanning (via GitHub)" <gi...@apache.org> on 2025/10/02 12:27:14 UTC
[PR] compiler warning about varargs [pekko-http]
pjfanning opened a new pull request, #812:
URL: https://github.com/apache/pekko-http/pull/812
issues like
```
[warn] /home/runner/work/pekko-http/pekko-http/http-core/src/main/scala/org/apache/pekko/http/impl/model/UriJavaAccessor.scala:40:99: Passing an explicit array value to a Scala varargs method is deprecated (since 2.13.0) and will result in a defensive copy; Use the more efficient non-copying ArraySeq.unsafeWrapArray or an explicit toIndexedSeq call
```
--
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-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] compiler warning about varargs [pekko-http]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning merged PR #812:
URL: https://github.com/apache/pekko-http/pull/812
--
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-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] compiler warning about varargs [pekko-http]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on code in PR #812:
URL: https://github.com/apache/pekko-http/pull/812#discussion_r2398697886
##########
http-core/src/main/scala/org/apache/pekko/http/impl/model/UriJavaAccessor.scala:
##########
@@ -37,7 +40,7 @@ private[http] object UriJavaAccessor {
def hostApply(string: String, charset: Charset): Host = Uri.Host(string, charset = charset)
def emptyHost: Uri.Host = Uri.Host.Empty
- def queryApply(params: Array[pekko.japi.Pair[String, String]]): Uri.Query = Uri.Query(params.map(_.toScala): _*)
+ def queryApply(params: Array[pekko.japi.Pair[String, String]]): Uri.Query = Uri.Query(ArraySeq.unsafeWrapArray(params.map(_.toScala)): _*)
Review Comment:
the code doesn't compile with it
--
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-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] compiler warning about varargs [pekko-http]
Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin commented on code in PR #812:
URL: https://github.com/apache/pekko-http/pull/812#discussion_r2398645873
##########
http-core/src/main/scala/org/apache/pekko/http/impl/model/UriJavaAccessor.scala:
##########
@@ -37,7 +40,7 @@ private[http] object UriJavaAccessor {
def hostApply(string: String, charset: Charset): Host = Uri.Host(string, charset = charset)
def emptyHost: Uri.Host = Uri.Host.Empty
- def queryApply(params: Array[pekko.japi.Pair[String, String]]): Uri.Query = Uri.Query(params.map(_.toScala): _*)
+ def queryApply(params: Array[pekko.japi.Pair[String, String]]): Uri.Query = Uri.Query(ArraySeq.unsafeWrapArray(params.map(_.toScala)): _*)
Review Comment:
should we remove the _*
--
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-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org