}
private BundleDescription addBundle(Dictionary enhancedManifest, File bundleLocation, boolean override)
throws BundleException {
BundleDescription descriptor =
factory.createBundleDescription(state, enhancedManifest, bundleLocation.getAbsolutePath(), getNextId());
setUserProperty(descriptor, PROP_MANIFEST, enhancedManifest);
if (override) {
BundleDescription[] conflicts = state.getBundles(descriptor.getSymbolicName());
if (conflicts != null) {
for (BundleDescription conflict : conflicts) {
state.removeBundle(conflict);
logger
.warn(conflict.toString() + " has been replaced by another bundle with the same symbolic name "
+ descriptor.toString());
}
}
}
state.addBundle(descriptor);