зеркало из https://github.com/mozilla/gecko-dev.git
Bug 946083: Prevent the annotation processor from choking on stale classfiles in the objdir. r=rnewman
This commit is contained in:
Родитель
5b486f5042
Коммит
caf7e42559
|
@ -31,7 +31,19 @@ public class JarClassIterator implements Iterator<ClassWithOptions> {
|
|||
String className = mTargetClassListIterator.next();
|
||||
try {
|
||||
Class<?> ret = mTarget.loadClass(className);
|
||||
if (ret.getCanonicalName() == null || "null".equals(ret.getCanonicalName())) {
|
||||
final String canonicalName;
|
||||
|
||||
// Incremental builds can leave stale classfiles in the jar. Such classfiles will cause
|
||||
// an exception at this point. We can safely ignore these classes - they cannot possibly
|
||||
// ever be loaded as they conflict with their parent class and will be killed by Proguard
|
||||
// later on anyway.
|
||||
try {
|
||||
canonicalName = ret.getCanonicalName();
|
||||
} catch (IncompatibleClassChangeError e) {
|
||||
return next();
|
||||
}
|
||||
|
||||
if (canonicalName == null || "null".equals(canonicalName)) {
|
||||
// Anonymous inner class - unsupported.
|
||||
return next();
|
||||
} else {
|
||||
|
|
Загрузка…
Ссылка в новой задаче