Skip to content

Commit

Permalink
fix scala3 compile
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastian-alfers committed Oct 1, 2024
1 parent 0f640ef commit 4c7cc4e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions s3/src/main/scala/akka/stream/alpakka/s3/settings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import java.nio.file.{Path, Paths}
import java.time.{Duration => JavaDuration}
import java.util.concurrent.TimeUnit
import java.util.{Objects, Optional}

import akka.actor.{ActorSystem, ClassicActorSystemProvider}
import akka.http.scaladsl.model.Uri
import akka.stream.alpakka.s3.AccessStyle.{PathAccessStyle, VirtualHostAccessStyle}
Expand All @@ -17,6 +16,7 @@ import org.slf4j.LoggerFactory
import software.amazon.awssdk.auth.credentials._
import software.amazon.awssdk.regions.Region
import software.amazon.awssdk.regions.providers._
import software.amazon.awssdk.utils.builder.{CopyableBuilder, ToCopyableBuilder}

import scala.jdk.OptionConverters._
import scala.concurrent.duration._
Expand Down Expand Up @@ -596,7 +596,7 @@ object S3Settings {
val aki = c.getString("aws.credentials.access-key-id")
val sak = c.getString("aws.credentials.secret-access-key")
val tokenPath = "aws.credentials.token"
val creds = if (c.hasPath(tokenPath)) {
val creds: AwsCredentials = if (c.hasPath(tokenPath)) {
AwsSessionCredentials.create(aki, sak, c.getString(tokenPath))
} else {
AwsBasicCredentials.create(aki, sak)
Expand Down

0 comments on commit 4c7cc4e

Please sign in to comment.