The premise of the question is flawed, because catching Exception does catch RuntimeException. Demo code:
public class Test {
public static void main(String[] args) {
try {
throw new RuntimeException("Bang");
} catch (Exception e) {
System.out.println("I caught: " + e);
}
}
}
Output:
I caught: java.lang.RuntimeException: Bang
Your loop will have problems if:
callbacksis null- anything modifies
callbackswhile the loop is executing (if it were a collection rather than an array)
Perhaps that’s what you’re seeing?