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

Signed-off-by: Graham <gpe@openrs2.org>
Graham 4 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 nameHashTable = nameHashTable ?: return null
val ids = nameHashTable.getOrDefault(nameHash, IntSortedSets.EMPTY_SET) val ids = nameHashTable.getOrDefault(nameHash, IntSortedSets.EMPTY_SET)
return if (ids.isNotEmpty()) { return if (ids.isNotEmpty()) {
get(ids.firstInt()) ?: throw AssertionError() get(ids.firstInt())!!
} else { } else {
null null
} }

Loading…
Cancel
Save