Skip to content
This repository was archived by the owner on Oct 10, 2023. It is now read-only.

Commit 7ad66dc

Browse files
scala-steward-for-moia[bot]scala-stewardsaeltz
authored
Update scalac-scapegoat-plugin to 1.4.12 (#262)
* Update scalac-scapegoat-plugin to 1.4.12 * Fix scapegoat warning about `.head` Signed-off-by: Bendix Saeltz <bendix@saeltz.de> Co-authored-by: scala-steward <162267+scala-steward-for-moia[bot]@users.noreply.github.com> Co-authored-by: Bendix Sältz <bendix@saeltz.de>
1 parent 77bebc1 commit 7ad66dc

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ lazy val scalaDependencies = Seq(
6363
"org.scala-lang.modules" %% "scala-collection-compat" % "2.6.0"
6464
)
6565

66-
ThisBuild / scapegoatVersion := "1.4.11"
66+
ThisBuild / scapegoatVersion := "1.4.12"
6767

6868
lazy val scalacOptions_2_12 = Seq(
6969
"-unchecked",

src/main/scala/io/moia/scalaHttpClient/AwsRequestSigner.scala

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,7 @@ class AwsRequestSigner private (credentialsProvider: AwsCredentialsProvider, reg
105105
signedSdkRequest
106106
.headers()
107107
.asScala
108-
.toSeq
109-
.map(h => HttpHeader.parse(h._1, h._2.asScala.head))
108+
.flatMap(header => header._2.asScala.headOption.map(value => HttpHeader.parse(header._1, value)))
110109
.collect { case ParsingResult.Ok(header, _) =>
111110
header
112111
}
@@ -118,9 +117,7 @@ object AwsRequestSigner extends StrictLogging {
118117

119118
object AwsRequestSignerConfig {
120119
final case class AssumeRole(roleArn: String, roleSessionName: String, awsRegion: String) extends AwsRequestSignerConfig
121-
122120
final case class BasicCredentials(accessKey: String, secretKey: String, awsRegion: String) extends AwsRequestSignerConfig
123-
124121
final case class Instance(awsRegion: String) extends AwsRequestSignerConfig
125122
}
126123

0 commit comments

Comments
 (0)