Skip to content

Commit

Permalink
Adapt code to new wartremover rules
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas Chapuis authored and jchapuis committed Oct 10, 2024
1 parent 5b4a3dd commit 3eca552
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/src/main/scala/endless/transaction/Coordinator.scala
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,5 @@ trait Coordinator[F[_], TID, BID, Q, R] {
}

object Coordinator {
object TransactionAlreadyExists extends Exception("Transaction with the given ID already exists")
class TransactionAlreadyExists extends Exception("Transaction with the given ID already exists")
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ private[transaction] final class ShardedCoordinator[F[_]: Logger, TID, BID, Q, R
case Left(_) =>
Resource.eval(Logger[F].warn(show"Transaction $id already exists")) >> Resource
.raiseError[F, Transaction[F, BID, Q, R], Throwable](
Coordinator.TransactionAlreadyExists
new Coordinator.TransactionAlreadyExists
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ class ShardedCoordinatorSuite
def entityFor(id: TID): TransactionAlg[IO, TID, BID, Q, R] = testTransaction
}
val coordinator = new ShardedCoordinator(sharding)
interceptIO[Coordinator.TransactionAlreadyExists.type](
interceptIO[Coordinator.TransactionAlreadyExists](
coordinator
.create(tid, query, branches.head, branches.tail*)
.use_
Expand Down

0 comments on commit 3eca552

Please sign in to comment.