Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c7145011 authored by Deepanshu Gupta's avatar Deepanshu Gupta
Browse files

Revert "Replace infinite loop with foreach."

This reverts commit c77f9c76.

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
parent 008e1fb9
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -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]);