This is an automated email from the ASF dual-hosted git repository.
fanningpj pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pekko-http.git
The following commit(s) were added to refs/heads/main by this push:
new f318d6d64 Replace deprecated args-method (#972)
f318d6d64 is described below
commit f318d6d64bfdf14e272750463623c9c79c05e02e
Author: Philippus Baalman <[email protected]>
AuthorDate: Sun Mar 1 10:30:37 2026 +0100
Replace deprecated args-method (#972)
---
.../scala/org/apache/pekko/http/fix/MigrateToServerBuilder.scala | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git
a/http-scalafix/scalafix-rules/src/main/scala/org/apache/pekko/http/fix/MigrateToServerBuilder.scala
b/http-scalafix/scalafix-rules/src/main/scala/org/apache/pekko/http/fix/MigrateToServerBuilder.scala
index 1916c24e2..d0feabbf8 100644
---
a/http-scalafix/scalafix-rules/src/main/scala/org/apache/pekko/http/fix/MigrateToServerBuilder.scala
+++
b/http-scalafix/scalafix-rules/src/main/scala/org/apache/pekko/http/fix/MigrateToServerBuilder.scala
@@ -28,7 +28,7 @@ class MigrateToServerBuilder extends
SemanticRule("MigrateToServerBuilder") {
Try {
val sig =
t.parent.get.symbol.info.get.signature.asInstanceOf[MethodSignature]
require(sig.parameterLists(1)(0).signature.toString ==
"Materializer")
- (t.parent.get, t.parent.get.asInstanceOf[Term.Apply].args.head)
+ (t.parent.get,
t.parent.get.asInstanceOf[Term.Apply].argClause.values.head)
}.toOption
val materializerLint: Option[Patch] = materializerAndTarget.map {
@@ -42,7 +42,8 @@ class MigrateToServerBuilder extends
SemanticRule("MigrateToServerBuilder") {
}
val argExps =
- namedArgMap(args, t.asInstanceOf[Term.Apply].args) ++
materializerAndTarget.map("materializer" -> _._2).toSeq
+ namedArgMap(args, t.asInstanceOf[Term.Apply].argClause.values) ++
+ materializerAndTarget.map("materializer" -> _._2).toSeq
val targetTree = materializerAndTarget.map(_._1).getOrElse(t) // patch
parent if materializer arg is found
patchTree(targetTree, http, argExps, targetMethod(argExps("handler"))) +
materializerLint
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]