Source:
private Object loadClass(String className, Class[] constructorSignature, Object[] constructorArgs, boolean isView) { Class<?> aClass = myLoadedClasses.get(className); try { if (aClass != null) { checkModified(className); return createNewInstance(aClass, constructorSignature, constructorArgs, isView); } aClass = loadClass(className); if (aClass != null) { checkModified(className); myLoadingClasses.add(aClass); if (myLoadingClasses.count(aClass) > 100) { throw new InstantiationException("The layout involves creation of " + className + " over 100 levels deep. Infinite recursion?"); } try { final Object viewObject = createNewInstance(aClass, constructorSignature, constructorArgs, isView); myLoadedClasses.put(className, aClass); return viewObject; } finally { myLoadingClasses.remove(aClass); } } } catch (InconvertibleClassError e) { myLogger.addIncorrectFormatClass(e.getClassName(), e); } catch (LinkageError e) { myLogger.addBrokenClass(className, e); } catch (ClassNotFoundException e) { myLogger.addBrokenClass(className, e); } catch (InvocationTargetException e) { final Throwable cause = e.getCause(); if (cause instanceof InconvertibleClassError) { InconvertibleClassError error = (InconvertibleClassError)cause; myLogger.addIncorrectFormatClass(error.getClassName(), error); } else { myLogger.addBrokenClass(className, cause); } } catch (IllegalAccessException e) { myLogger.addBrokenClass(className, e); } catch (InstantiationException e) { myLogger.addBrokenClass(className, e); } catch (NoSuchMethodException e) { myLogger.addBrokenClass(className, e); } return null; }

Target:
private Object loadClass(String className, Class[] constructorSignature, Object[] constructorArgs, boolean isView) { Class<?> aClass = myLoadedClasses.get(className); try { if (aClass != null) { checkModified(className); return createNewInstance(aClass, constructorSignature, constructorArgs, isView); } aClass = loadClass(className); if (aClass != null) { checkModified(className); if (myLoadingClasses.count(aClass) > ALLOWED_NESTED_VIEWS) { throw new InstantiationException("The layout involves creation of " + className + " over 100 levels deep. Infinite recursion?"); } myLoadingClasses.add(aClass); try { final Object viewObject = createNewInstance(aClass, constructorSignature, constructorArgs, isView); myLoadedClasses.put(className, aClass); return viewObject; } finally { myLoadingClasses.remove(aClass); } } } catch (InconvertibleClassError e) { myLogger.addIncorrectFormatClass(e.getClassName(), e); } catch (LinkageError e) { myLogger.addBrokenClass(className, e); } catch (ClassNotFoundException e) { myLogger.addBrokenClass(className, e); } catch (InvocationTargetException e) { final Throwable cause = e.getCause(); if (cause instanceof InconvertibleClassError) { InconvertibleClassError error = (InconvertibleClassError)cause; myLogger.addIncorrectFormatClass(error.getClassName(), error); } else { myLogger.addBrokenClass(className, cause); } } catch (IllegalAccessException e) { myLogger.addBrokenClass(className, e); } catch (InstantiationException e) { myLogger.addBrokenClass(className, e); } catch (NoSuchMethodException e) { myLogger.addBrokenClass(className, e); } return null; }