OSDN Git Service

Mechanical refactoring of dx into two parts.
[android-x86/dalvik.git] / dx / src / com / android / dx / io / instructions / DecodedInstruction.java
index e418a1c..e5b7073 100644 (file)
 
 package com.android.dx.io.instructions;
 
+import com.android.dex.DexException;
 import com.android.dx.io.IndexType;
 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;
 
 /**
@@ -59,7 +58,7 @@ public abstract class DecodedInstruction {
 
     /**
      * literal value argument; also used for special verification error
-     * constants (formats 20bc and 40sc) as well as should-be-zero values
+     * constants (format 20bc) as well as should-be-zero values
      * (formats 10x, 20t, 30t, and 32x)
      */
     private final long literal;
@@ -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;