Skip to content

Commit 8d75a30

Browse files
committed
Simplify String.asQueryParameters()
1 parent 94b7a77 commit 8d75a30

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

oauth2-server-integration-base/src/main/java/nl/myndocs/oauth2/integration/BaseIntegrationTest.kt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,7 @@ abstract class BaseIntegrationTest {
161161
fun ObjectMapper.readMap(content: String) = this.readValue(content, Map::class.java)
162162

163163
fun String.asQueryParameters() =
164-
split("?")[1]
165-
.split("&")
166-
.map { it.split("=") }
167-
.map { Pair(it[0], it[1]) }
168-
.toMap()
164+
split("?")[1]
165+
.split("&")
166+
.map { it.split("=") }
167+
.associate { Pair(it[0], it[1]) }

0 commit comments

Comments
 (0)