Skip to content

Commit

Permalink
already defined names
Browse files Browse the repository at this point in the history
  • Loading branch information
johanandren committed Dec 18, 2024
1 parent cc207d3 commit e002449
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,12 @@ import scala.concurrent.Future
implicit val um: Unmarshaller[HttpResponse, StorageObject] = Unmarshaller.withMaterializer {
implicit ec => implicit mat =>
{
case HttpResponse(status, _, entity, _) if status.isSuccess() =>
case HttpResponse(responseStatus, _, entity, _) if responseStatus.isSuccess() =>
Unmarshal(entity).to[StorageObject]
case HttpResponse(status, _, entity, _) =>
case HttpResponse(responseStatus, _, entity, _) =>
Unmarshal(entity).to[String].flatMap { errorString =>
Future.failed(new RuntimeException(s"Uploading part failed with status $status: $errorString"))
Future
.failed(new RuntimeException(s"Uploading part failed with status $responseStatus: $errorString"))
}
}: PartialFunction[HttpResponse, Future[StorageObject]]
}.withDefaultRetry
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1236,7 +1236,7 @@ class JmsConnectorsSpec extends JmsSpec {
val respondStreamControl: JmsConsumerControl =
JmsConsumer(JmsConsumerSettings(system, connectionFactory).withQueue("test"))
.collect {
case message: TextMessage => JmsTextMessage(message)
case textMessage: TextMessage => JmsTextMessage(textMessage)
}
.map { textMessage =>
textMessage.headers.foldLeft(JmsTextMessage(textMessage.body.reverse)) {
Expand Down
2 changes: 1 addition & 1 deletion jms/src/test/scala/docs/scaladsl/JmsConnectorsSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1228,7 +1228,7 @@ class JmsConnectorsSpec extends JmsSpec {
val respondStreamControl: JmsConsumerControl =
JmsConsumer(JmsConsumerSettings(system, connectionFactory).withQueue("test"))
.collect {
case message: TextMessage => JmsTextMessage(message)
case textMessage: TextMessage => JmsTextMessage(textMessage)
}
.map { textMessage =>
textMessage.headers.foldLeft(JmsTextMessage(textMessage.body.reverse)) {
Expand Down

0 comments on commit e002449

Please sign in to comment.