VAuthenticator / vauthenticator

VAuthenticator OpenID Connect/OAuth2.1 Auth server
Apache License 2.0
17 stars 1 forks source link

Use Kotlin built-in Nullable checking #229

Closed hantsy closed 4 days ago

hantsy commented 6 days ago

I found a lot of codes like this: https://github.com/VAuthenticator/vauthenticator/blob/master/src/main/kotlin/com/vauthenticator/server/oauth2/authorizationservice/RedisOAuth2AuthorizationService.kt#L39 to check the method parameters.

Assert.notNull(....) 

For Kotlin, if it is nullable, add a ? to the method parameter declaration, else it is with a not null constraint by default.