Skip to content
Permalink
Browse files

Check for a null return value from get in misk-redis (#967)

  • Loading branch information...
hamdanjaveed committed May 4, 2019
1 parent 98796ad commit 03c54714b22b3cb2529c9dbd770fbf90c6755fdd
Showing with 1 addition and 1 deletion.
  1. +1 −1 misk-redis/src/main/kotlin/misk/redis/RealRedis.kt
@@ -24,7 +24,7 @@ class RealRedis(private val jedisPool: JedisPool) : Redis {
// Get a ByteString value
override fun get(key: String): ByteString? {
jedisPool.resource.use { jedis ->
return jedis.get(key.toByteArray(charset)).toByteString()
return jedis.get(key.toByteArray(charset))?.toByteString()
}
}

0 comments on commit 03c5471

Please sign in to comment.
You can’t perform that action at this time.