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 36b819d commit 6da8ca8Copy full SHA for 6da8ca8
oauth2-server-core/src/main/java/nl/myndocs/oauth2/scope/ScopeParser.kt
@@ -3,11 +3,10 @@ package nl.myndocs.oauth2.scope
3
object ScopeParser {
4
private const val SCOPE_SEPARATOR = " "
5
6
- fun parseScopes(scopes: String?): Set<String> {
7
- if (!scopes.isNullOrBlank()) {
8
- return scopes.split(SCOPE_SEPARATOR).toSet()
9
- }
10
-
11
- return setOf()
12
+ fun parseScopes(scopes: String?): Set<String> =
+ if (!scopes.isNullOrBlank())
+ scopes
+ .split(SCOPE_SEPARATOR)
+ .toSet()
+ else setOf()
13
}
0 commit comments