From 8df09071185b821d2bbe5de98fe4796419d7d47e Mon Sep 17 00:00:00 2001 From: Graham Date: Wed, 5 Feb 2020 09:22:31 +0000 Subject: [PATCH] Replace IllegalStateException with error() in BitMaskTransformer --- .../java/dev/openrs2/deob/ast/transform/BitMaskTransformer.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deob-ast/src/main/java/dev/openrs2/deob/ast/transform/BitMaskTransformer.kt b/deob-ast/src/main/java/dev/openrs2/deob/ast/transform/BitMaskTransformer.kt index 388ad71682..ba1802adb3 100644 --- a/deob-ast/src/main/java/dev/openrs2/deob/ast/transform/BitMaskTransformer.kt +++ b/deob-ast/src/main/java/dev/openrs2/deob/ast/transform/BitMaskTransformer.kt @@ -35,7 +35,7 @@ class BitMaskTransformer : Transformer() { mask = when (shiftOp) { BinaryExpr.Operator.SIGNED_RIGHT_SHIFT -> mask shr shamt BinaryExpr.Operator.UNSIGNED_RIGHT_SHIFT -> mask ushr shamt - else -> throw IllegalStateException() + else -> error("Invalid shiftOp") } maskExpr = IntegerLiteralExpr(mask) @@ -45,7 +45,7 @@ class BitMaskTransformer : Transformer() { mask = when (shiftOp) { BinaryExpr.Operator.SIGNED_RIGHT_SHIFT -> mask shr shamt BinaryExpr.Operator.UNSIGNED_RIGHT_SHIFT -> mask ushr shamt - else -> throw IllegalStateException() + else -> error("Invalid shiftOp") } maskExpr = createLong(mask)