Replace infinite loop with foreach.

A method call exists to find all inner classes. Use it instead of
manually enumerating the possibilities and checking.

Also fix a typo.

Change-Id: I2af678e92ea0c11b53617b247d8cda324391c185
This commit is contained in:
Deepanshu Gupta
2015-06-30 14:30:55 -07:00
parent 5d1eaf4a19
commit c77f9c76e4
2 changed files with 3 additions and 9 deletions

View File

@@ -151,7 +151,7 @@ public class AppCompatActionBar extends BridgeActionBar {
@Override
public void createMenuPopup() {
// it's hard to addd menus to appcompat's actionbar, since it'll use a lot of reflection.
// it's hard to add menus to appcompat's actionbar, since it'll use a lot of reflection.
// so we skip it for now.
}

View File

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