David Glasser
09/05/2019, 6:52 PMcache.getIfPresentAsync("x").let { deferred ->
assertNotNull(deferred)
assertTrue(deferred.isCompleted)
assertEquals(42, deferred.await())
}
IntelliJ is giving me an inspection "Deferred result is never used" on the word assertNotNull. Is there actually anything wrong with my code?
It looks like the inspection goes away if I delete the assertNotNull line and change the assertTrue to deferred!!.isCompleted
, but I'm wondering if I'm missing somethingjw
09/05/2019, 6:59 PMassertNotNull
returns the non-null value. You can file a bug about it if you want.David Glasser
09/05/2019, 7:13 PMjw
09/05/2019, 7:16 PM