From 0016b8ab7d125b5635fb0efea7fd0023dfb82294 Mon Sep 17 00:00:00 2001 From: Graham Date: Sun, 7 Feb 2021 12:49:20 +0000 Subject: [PATCH] Replace AssertionError with IllegalStateException Signed-off-by: Graham --- cache/src/main/kotlin/org/openrs2/cache/Js5Compression.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cache/src/main/kotlin/org/openrs2/cache/Js5Compression.kt b/cache/src/main/kotlin/org/openrs2/cache/Js5Compression.kt index d07eb3f9fd..ff09f51d39 100644 --- a/cache/src/main/kotlin/org/openrs2/cache/Js5Compression.kt +++ b/cache/src/main/kotlin/org/openrs2/cache/Js5Compression.kt @@ -290,9 +290,7 @@ public object Js5Compression { // Run the entire decompression algorithm to confirm the key is valid. decrypt(input, lenWithUncompressedLen, key).use { plaintext -> val uncompressedLen = plaintext.readInt() - if (uncompressedLen < 0) { - throw AssertionError() - } + check(uncompressedLen >= 0) try { OutputStream.nullOutputStream().use { output ->