Source:
public Class classForName( String name ) { Class<?> c = absoluteClassCache.get(name); if (c != null ) return c; if ( absoluteNonClasses.contains(name) ) { Interpreter.debug("absoluteNonClass list hit: ", name); return null; } Interpreter.debug("Trying to load class: ", name); final ClassLoader overlayLoader = getLoaderForClass( name ); if ( overlayLoader != null ) { try { c = overlayLoader.loadClass(name); } catch ( Exception e ) { Interpreter.debug("overlay loader failed for '", "' - ", e); } } if ( c == null && name.startsWith(BSH_PACKAGE) ) { final ClassLoader myClassLoader = Interpreter.class.getClassLoader(); if (myClassLoader != null) { try { c = myClassLoader.loadClass(name); } catch (ClassNotFoundException e) { } catch (NoClassDefFoundError e) { } } else { try { c = Class.forName( name ); } catch ( ClassNotFoundException e ) { } catch ( NoClassDefFoundError e ) { } } } if ( c == null && baseLoader != null ) { try { c = baseLoader.loadClass(name); } catch (ClassNotFoundException e) { } } if ( c == null && externalClassLoader != null ) { try { c = externalClassLoader.loadClass(name); if (forceExternalClassLoader) { return c; } } catch (ClassNotFoundException e) { if (forceExternalClassLoader) { return null; } } } if ( c == null ) { try { final ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader(); if ( contextClassLoader != null ) { c = Class.forName( name, true, contextClassLoader ); } } catch ( ClassNotFoundException e ) { } catch ( NoClassDefFoundError e ) { } catch ( SecurityException e ) { } } if ( c == null ) try { c = Class.forName( name ); } catch ( ClassNotFoundException e ) { } if ( c == null ) c = loadSourceClass( name ); cacheClassInfo( name, c ); return c; }

Target:
public Class classForName( String name ) { Class<?> c = absoluteClassCache.get(name); if (c != null ) return c; if ( absoluteNonClasses.contains(name) ) { Interpreter.debug("absoluteNonClass list hit: ", name); return null; } Interpreter.debug("Trying to load class: ", name); final ClassLoader overlayLoader = getLoaderForClass( name ); if ( overlayLoader != null ) { try { c = overlayLoader.loadClass(name); } catch ( Exception e ) { Interpreter.debug("overlay loader failed for '", "' - ", e); } } if ( c == null && name.startsWith(BSH_PACKAGE) ) { final ClassLoader myClassLoader = Interpreter.class.getClassLoader(); if (myClassLoader != null) { try { c = myClassLoader.loadClass(name); } catch (ClassNotFoundException e) { } catch (NoClassDefFoundError e) { } } else { try { c = Class.forName( name ); } catch ( ClassNotFoundException e ) { } catch ( NoClassDefFoundError e ) { } } } if ( c == null && baseLoader != null ) { try { c = baseLoader.loadClass(name); } catch (ClassNotFoundException e) { } } if ( c == null && externalClassLoader != null ) { try { c = externalClassLoader.loadClass(name); cacheClassInfo(name, c); return c; } catch (ClassNotFoundException e) { cacheClassInfo(name, null); return null; } } if ( c == null ) { try { final ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader(); if ( contextClassLoader != null ) { c = Class.forName( name, true, contextClassLoader ); } } catch ( ClassNotFoundException e ) { } catch ( NoClassDefFoundError e ) { } catch ( SecurityException e ) { } } if ( c == null ) try { c = Class.forName( name ); } catch ( ClassNotFoundException e ) { } if ( c == null ) c = loadSourceClass( name ); cacheClassInfo( name, c ); return c; }