private static Bundle _loadBundle ( BundleContext context , String path , InputStream is , boolean closeStream ) throws BundleException { log ( Log . LEVEL_INFO , "add bundle:" + path ) ; try { // we make this very simply so an old loader that is calling this still works return context . installBundle ( path , is ) ; } finally { // we make this very simply so an old loader that is calling this still works if ( closeStream && is != null ) { try { is . close ( ) ; } catch ( Throwable t ) { ExceptionUtil . rethrowIfNecessary ( t ) ; } } } }
does not check if the bundle already exists!