Revert "Replace infinite loop with foreach."

This reverts commit c77f9c76e4.

Class.getDeclaredClasses() doesn't return anonymous inner class and
hence the change was wrong.

The revert doesn't undo the typo fixed in the original change.

Change-Id: Id0595c4bc3db1185dd1ce39808a6b8c3610a1e11
This commit is contained in:
Deepanshu Gupta
2015-07-07 13:10:14 -07:00
parent 008e1fb9ed
commit c714501141

View File

@@ -94,8 +94,14 @@ public class AsmGenerator {
ListIterator<Class<?>> iter = injectedClasses.listIterator();
while (iter.hasNext()) {
Class<?> clazz = iter.next();
for (Class<?> aClass : clazz.getDeclaredClasses()) {
iter.add(aClass);
try {
int i = 1;
while(i < 100) {
iter.add(Class.forName(clazz.getName() + "$" + i));
i++;
}
} catch (ClassNotFoundException ignored) {
// Expected.
}
}
mInjectClasses = injectedClasses.toArray(new Class<?>[0]);