@ Override protected URL findResource ( String name ) { if ( resourceCache . containsKey ( name ) ) { return resourceCache . get ( name ) ; } for ( WeakReference < Bundle > ref : bundles ) { final Bundle bundle = ref . get ( ) ; if ( bundle != null && bundle . getState ( ) == Bundle . ACTIVE ) { try { final URL resource = bundle . getResource ( name ) ; if ( resource != null ) { resourceCache . put ( name , resource ) ; return resource ; } } catch ( Exception ignore ) { } } } // TODO: Error? return null ; }
Load the resource and break on first found match .