chore: bump scalafmt to 3.9.7 (#1916)

This commit is contained in:
He-Pin(kerr) 2025-06-24 16:27:14 +08:00 committed by GitHub
parent 21ad8968b1
commit 9577b01b10
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
308 changed files with 689 additions and 688 deletions

View file

@ -504,8 +504,8 @@ private[pekko] class Controller(private var initialParticipants: Int, controller
barrier.forward(c)
case op: ServerOp =>
op match {
case _: EnterBarrier => barrier.forward(op)
case _: FailBarrier => barrier.forward(op)
case _: EnterBarrier => barrier.forward(op)
case _: FailBarrier => barrier.forward(op)
case GetAddress(node) =>
if (nodes contains node) sender() ! ToClient(AddressReply(node, nodes(node).addr))
else addrInterest += node -> ((addrInterest.get(node).getOrElse(Set())) + sender())
@ -526,7 +526,7 @@ private[pekko] class Controller(private var initialParticipants: Int, controller
case Remove(node) =>
barrier ! BarrierCoordinator.RemoveClient(node)
}
case GetNodes => sender() ! nodes.keys
case GetNodes => sender() ! nodes.keys
case GetSockAddr =>
sender() ! connection.channelFuture.sync().channel().localAddress()
}
@ -654,7 +654,7 @@ private[pekko] class BarrierCoordinator
handleBarrier(d.copy(arrived = together))
case Event(RemoveClient(name), d @ Data(clients, _, arrived, _)) =>
clients.find(_.name == name) match {
case None => stay()
case None => stay()
case Some(client) =>
handleBarrier(d.copy(clients = clients - client, arrived = arrived.filterNot(_ == client.fsm)))
}

View file

@ -163,7 +163,7 @@ private[pekko] class MsgDecoder extends MessageToMessageDecoder[AnyRef] {
case BarrierOp.Succeeded => BarrierResult(barrier.getName, true)
case BarrierOp.Failed => BarrierResult(barrier.getName, false)
case BarrierOp.Fail => FailBarrier(barrier.getName)
case BarrierOp.Enter =>
case BarrierOp.Enter =>
EnterBarrier(
barrier.getName,
if (barrier.hasTimeout) Option(Duration.fromNanos(barrier.getTimeout)) else None)

View file

@ -279,7 +279,7 @@ private[pekko] class ClientFSM(name: RoleName, controllerAddr: InetSocketAddress
cmdFuture.foreach {
case true => self ! ToServer(Done)
case _ =>
case _ =>
throw new RuntimeException("Throttle was requested from the TestConductor, but no transport " +
"adapters available that support throttling. Specify `testTransport(on = true)` in your MultiNodeConfig")
}
@ -359,7 +359,7 @@ private[pekko] class PlayerHandler(
private def tryConnectToController(): Unit = {
Try(reconnect()) match {
case Success(r) => connectionRef.set(r)
case Success(r) => connectionRef.set(r)
case Failure(ex) =>
log.error("Error when trying to connect to remote addr:[{}] will retry, time left:[{}], cause:[{}].",
server, nextAttempt.timeLeft, ex.getMessage)

View file

@ -508,7 +508,7 @@ abstract class MultiNodeSpec(
case (base, r @ Replacement(tag, _)) =>
base.indexOf(tag) match {
case -1 => base
case _ =>
case _ =>
val replaceWith =
try r.addr
catch {
@ -526,7 +526,7 @@ abstract class MultiNodeSpec(
import pekko.util.ccompat.JavaConverters._
ConfigFactory.parseString(deployString).root.asScala.foreach {
case (key, value: ConfigObject) => deployer.parseConfig(key, value.toConfig).foreach(deployer.deploy)
case (key, x) =>
case (key, x) =>
throw new IllegalArgumentException(s"key $key must map to deployment section, not simple value $x")
}
}