private void initBundleDependencies ( String rootBundleDefinition , ResourceBundleDefinition definition , List < JoinableResourceBundle > bundleDependencies , List < String > processedBundles , List < JoinableResourceBundle > bundles ) throws BundleDependencyException { List < String > bundleDefDependencies = definition . getDependencies ( ) ; if ( definition . isGlobal ( ) ) { if ( LOGGER . isInfoEnabled ( ) ) { LOGGER . info ( "The global bundle '" + definition . getBundleName ( ) + "' belongs to the dependencies of '" + rootBundleDefinition + "'." + "As it's a global bundle, it will not be defined as part of the dependencies." ) ; } return ; } if ( bundleDefDependencies != null && ! bundleDefDependencies . isEmpty ( ) ) { if ( processedBundles . contains ( definition . getBundleName ( ) ) ) { throw new BundleDependencyException ( rootBundleDefinition , "There is a circular dependency. The bundle in conflict is '" + definition . getBundleName ( ) + "'" ) ; } else { processedBundles . add ( definition . getBundleName ( ) ) ; for ( String dependency : bundleDefDependencies ) { for ( ResourceBundleDefinition dependencyBundle : bundleDefinitions ) { String dependencyBundleName = dependencyBundle . getBundleName ( ) ; if ( dependencyBundleName . equals ( dependency ) ) { if ( ! bundleListContains ( bundleDependencies , dependencyBundleName ) ) { if ( ! processedBundles . contains ( dependencyBundleName ) ) { initBundleDependencies ( rootBundleDefinition , dependencyBundle , bundleDependencies , processedBundles , bundles ) ; bundleDependencies . add ( getBundleFromName ( dependencyBundleName , bundles ) ) ; } else { throw new BundleDependencyException ( rootBundleDefinition , "There is a circular dependency. The bundle in conflict is '" + dependencyBundleName + "'" ) ; } } else { if ( LOGGER . isInfoEnabled ( ) ) { LOGGER . info ( "The bundle '" + dependencyBundle . getBundleId ( ) + "' occurs multiple time in the dependencies hierarchy of the bundle '" + rootBundleDefinition + "'." ) ; } } } } } } } }
Initialize the bundle dependencies