Don't let later entries in the classpath override classes from earlier entries

This commit is contained in:
Ben Gruver 2012-03-23 01:53:16 -07:00
parent 1acfb0ef18
commit 0044afa4c3

View File

@ -243,7 +243,9 @@ public class ClassPath {
//TODO: need to check if the class already exists. (and if so, what to do about it?) //TODO: need to check if the class already exists. (and if so, what to do about it?)
TempClassInfo tempClassInfo = new TempClassInfo(dexFilePath, classDefItem); TempClassInfo tempClassInfo = new TempClassInfo(dexFilePath, classDefItem);
if (!tempClasses.containsKey(tempClassInfo.classType)) {
tempClasses.put(tempClassInfo.classType, tempClassInfo); tempClasses.put(tempClassInfo.classType, tempClassInfo);
}
} catch (Exception ex) { } catch (Exception ex) {
throw ExceptionWithContext.withContext(ex, String.format("Error while loading class %s", throw ExceptionWithContext.withContext(ex, String.format("Error while loading class %s",
classDefItem.getClassType().getTypeDescriptor())); classDefItem.getClassType().getTypeDescriptor()));