Skip to content

Commit 7dfd6ef

Browse files
jcrawford13jenkins
authored andcommitted
util/util-security: scala2.13 compat for MapValues
Problem scala2.13 introduce a breaking change to mapValues to return a view instead of a map. This broke the util-security build which was updated in D617641 to use mapValues. Solution Force the view into a map with `toMap` Result util-security can build for scala2.13 JIRA Issues: PSEC-10357 Differential Revision: https://phabricator.twitter.biz/D787935
1 parent 3643e1e commit 7dfd6ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

util-security/src/main/scala/com/twitter/util/security/Credentials.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ object Credentials {
4444
def apply(data: String): Map[String, String] = {
4545
val result: java.util.Map[String, Any] = parser.get.load(data)
4646
Option(result)
47-
.map(_.asScala.toMap.mapValues(v => if (v == null) "null" else v.toString)).getOrElse(
47+
.map(_.asScala.toMap.mapValues(v => if (v == null) "null" else v.toString).toMap).getOrElse(
4848
Map.empty)
4949
}
5050
}

0 commit comments

Comments
 (0)