Replace `?: throw AssertionError()` with `!!`

Signed-off-by: Graham <gpe@openrs2.org>
pull/132/head
Graham 3 years ago
parent d78c382ea7
commit 1c13fec91f
  1. 2
      cache/src/main/kotlin/org/openrs2/cache/NamedEntryCollection.kt

@ -128,7 +128,7 @@ public abstract class NamedEntryCollection<T : NamedEntry>(
val nameHashTable = nameHashTable ?: return null
val ids = nameHashTable.getOrDefault(nameHash, IntSortedSets.EMPTY_SET)
return if (ids.isNotEmpty()) {
get(ids.firstInt()) ?: throw AssertionError()
get(ids.firstInt())!!
} else {
null
}

Loading…
Cancel
Save