We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 764a605 commit e27646fCopy full SHA for e27646f
oauth2-server-core/src/main/java/nl/myndocs/oauth2/exception/OauthExceptionUtil.kt
@@ -1,14 +1,8 @@
1
package nl.myndocs.oauth2.exception
2
3
-fun OauthException.toMap(): Map<String, String> {
4
-
5
- val mutableMapOf = mutableMapOf<String, String>(
6
- "error" to this.error.errorName
7
- )
8
9
- if (this.errorDescription != null) {
10
- mutableMapOf["error_description"] = this.errorDescription
+fun OauthException.toMap(): Map<String, String> = with(mutableMapOf("error" to error.errorName)) {
+ if (errorDescription != null) {
+ this["error_description"] = errorDescription
11
}
12
13
- return mutableMapOf.toMap()
+ toMap()
14
0 commit comments