From 2cdb0f99380a09f494977d1799e21e2a79d40a65 Mon Sep 17 00:00:00 2001 From: Jesse Wilson Date: Tue, 13 Dec 2011 16:42:38 -0500 Subject: [PATCH] Don't throw an AssertionError on invalid input. Throwing an AssertionError prevents tools like FindUsages from recovering. Bug: http://b/5470168 Change-Id: I6ae99bd29e25f868a739548266cedf85d0b26e90 --- dx/src/com/android/dx/io/instructions/DecodedInstruction.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dx/src/com/android/dx/io/instructions/DecodedInstruction.java b/dx/src/com/android/dx/io/instructions/DecodedInstruction.java index e418a1c0b..9d9e88e08 100644 --- a/dx/src/com/android/dx/io/instructions/DecodedInstruction.java +++ b/dx/src/com/android/dx/io/instructions/DecodedInstruction.java @@ -21,7 +21,6 @@ import com.android.dx.io.OpcodeInfo; import com.android.dx.io.Opcodes; import com.android.dx.util.DexException; import com.android.dx.util.Hex; - import java.io.EOFException; /** @@ -90,7 +89,7 @@ public abstract class DecodedInstruction { decoded[in.cursor()] = DecodedInstruction.decode(in); } } catch (EOFException ex) { - throw new AssertionError("shouldn't happen"); + throw new DexException(ex); } return decoded; -- 2.11.0