Throw an error if a switch data pseudo-instruction is encountered when auto-fixing a method.

git-svn-id: https://smali.googlecode.com/svn/trunk@518 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
This commit is contained in:
JesusFreke@JesusFreke.com 2009-12-24 08:07:44 +00:00
parent a8ca776c1d
commit 146fbfd33a

View File

@ -549,8 +549,7 @@ public class CodeItem extends Item<CodeItem> {
int originalSwitchOffset = originalSwitchOffsetByOriginalSwitchDataOffset.get(originalDataOffset);
if (originalSwitchOffset == 0) {
//TODO: is it safe to skip an unreferenced switch data instruction? Or should it throw an exception?
continue;
throw new RuntimeException("This method contains an unreferenced switch data block, and can't be automatically fixed.");
}
assert newOffsetsByOriginalOffset.indexOfKey(originalSwitchOffset) >= 0;