Skip to content

Commit

Permalink
Merge pull request #230 from VAuthenticator/use-kotlin-built-in-nulla…
Browse files Browse the repository at this point in the history
…ble-checking

remove useless Assert.notNull in order to rely on build in kotlin nul…
  • Loading branch information
mrFlick72 authored Jun 24, 2024
2 parents ce4255e + 431e2f3 commit 84ea1b2
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ class RedisOAuth2AuthorizationService(private val redisTemplate: RedisTemplate<A
val logger: Logger = LoggerFactory.getLogger(RedisOAuth2AuthorizationService::class.java)

override fun save(authorization: OAuth2Authorization) {
Assert.notNull(authorization, "authorization cannot be null")
logger.debug("save")

redisTemplate.opsForHash<String, OAuth2Authorization>()
Expand All @@ -36,7 +35,6 @@ class RedisOAuth2AuthorizationService(private val redisTemplate: RedisTemplate<A
}

override fun remove(authorization: OAuth2Authorization) {
Assert.notNull(authorization, "authorization cannot be null")
logger.debug("remove")
redisTemplate.opsForHash<String, OAuth2Authorization>()
.delete(authorization.id, authorization.id.toSha256(), authorization)
Expand All @@ -59,7 +57,7 @@ class RedisOAuth2AuthorizationService(private val redisTemplate: RedisTemplate<A
return redisTemplate.opsForHash<String, OAuth2Authorization>().get(id, id.toSha256())
}

fun findByTokenFor(
private fun findByTokenFor(
authorization: OAuth2Authorization,
): List<String> {
val state = authorization.getAttribute(OAuth2ParameterNames.STATE) as String?
Expand Down

0 comments on commit 84ea1b2

Please sign in to comment.