Use Set instead of List internally in JsonKeyReader

We might as well do this as we aren't generating the sequence lazily.

Signed-off-by: Graham <gpe@openrs2.org>
bzip2
Graham 4 years ago
parent 03cb7701c5
commit 326371312d
  1. 2
      archive/src/main/kotlin/org/openrs2/archive/key/JsonKeyReader.kt

@ -14,7 +14,7 @@ public class JsonKeyReader @Inject constructor(
@Json private val mapper: ObjectMapper @Json private val mapper: ObjectMapper
) : KeyReader { ) : KeyReader {
override fun read(input: InputStream): Sequence<XteaKey> { override fun read(input: InputStream): Sequence<XteaKey> {
val keys = mutableListOf<XteaKey>() val keys = mutableSetOf<XteaKey>()
val root = mapper.readTree(input) val root = mapper.readTree(input)
when { when {

Loading…
Cancel
Save