Use require() in PlatformDetectionTransformer

pull/66/head
Graham 4 years ago
parent 8df0907118
commit 785ce2d9ca
  1. 4
      bundler/src/main/java/dev/openrs2/bundler/transform/PlatformDetectionTransformer.kt

@ -168,9 +168,7 @@ class PlatformDetectionTransformer : Transformer() {
val aloadIndex = match.indexOfFirst {
it is VarInsnNode && it.opcode == Opcodes.ALOAD && it.`var` == 0
}
if (aloadIndex == -1) {
throw IllegalArgumentException("Missing ALOAD_0")
}
require(aloadIndex != -1) { "Missing ALOAD_0" }
val list = InsnList()
for (i in aloadIndex until match.size) {

Loading…
Cancel
Save