diff --git a/src/main/java/soot/dexpler/DexFileProvider.java b/src/main/java/soot/dexpler/DexFileProvider.java index 190a99ea58b..9e04924f6b9 100644 --- a/src/main/java/soot/dexpler/DexFileProvider.java +++ b/src/main/java/soot/dexpler/DexFileProvider.java @@ -230,6 +230,10 @@ private Map> mappingForFile(File dexSour while (entryNameIterator.hasPrevious()) { String entryName = entryNameIterator.previous(); DexEntry entry = dexContainer.getEntry(entryName); + if (!acceptFile(entry)) { + continue; + } + entryName = deriveDexName(entryName); logger.debug("" + String.format("Found dex file '%s' with %d classes in '%s'", entryName, entry.getDexFile().getClasses().size(), dexSourceFile.getCanonicalPath())); @@ -249,6 +253,10 @@ private Map> mappingForFile(File dexSour return Collections.unmodifiableMap(dexMap); } + protected boolean acceptFile(DexEntry entry) { + return true; + } + private String deriveDexName(String entryName) { return new File(entryName).getName(); } diff --git a/src/main/java/soot/toDex/ExprVisitor.java b/src/main/java/soot/toDex/ExprVisitor.java index fade954d23b..2960b7b70ff 100644 --- a/src/main/java/soot/toDex/ExprVisitor.java +++ b/src/main/java/soot/toDex/ExprVisitor.java @@ -702,7 +702,7 @@ protected void castObject(Register sourceReg, Type castType) { } } - private void castPrimitive(Register sourceReg, Value source, Type castSootType) { + protected void castPrimitive(Register sourceReg, Value source, Type castSootType) { PrimitiveType castType = PrimitiveType.getByName(castSootType.toString()); // Fix null_types on the fly. This should not be necessary, but better