try {
// First, remove RemoteException, RuntimeException, Error, and their subclasses...
for (int i = 0; i < list.length; i++) {
ClassDeclaration decl = list[i].getClassDeclaration();
if (env.defRemoteException.superClassOf(env, decl) ||
env.defRuntimeException.superClassOf(env, decl) ||
env.defError.superClassOf(env, decl)) {
list[i] = null;
newSize--;