public void upgradeBundle(Path newBundle,String symbolicName) throws UpdateException {
  List<Bundle> installedBundles=getBundles(symbolicName);
  if (!installedBundles.isEmpty()) {
    replaceBundle(installedBundles,newBundle);
  }
 else {
    installBundle(newBundle);
  }
}

public void upgradeBundle ( Path newBundle , String symbolicName ) throws UpdateException { List < Bundle > installedBundles = getBundles ( symbolicName ) ; if ( ! installedBundles . isEmpty ( ) ) { replaceBundle ( installedBundles , newBundle ) ; } else { installBundle ( newBundle ) ; } }
upgrades a bundle by removing the old bundle if it is installed and replacing it with the new . if the new bundle has not been installed in the framework it will install it .
