/** * Determines whether stopping a bundle is strictly needed. * * @param session The current deployment session. * @param symbolicName The symbolic name of the bundle to inspect. * @return Returns <code>true</code> if <code>Constants.DEPLOYMENTPACKAGE_MISSING</code> is true * for the specified bundle in the source deployment package or if the version of the bundle * is the same in both source and target deployment package. Returns <code>false</code> * otherwise. */ private boolean omitBundleStop(DeploymentSessionImpl session, String symbolicName) { boolean result = false; BundleInfoImpl sourceBundleInfo = session.getSourceAbstractDeploymentPackage().getBundleInfoByName(symbolicName); BundleInfoImpl targetBundleInfo = session.getSourceAbstractDeploymentPackage().getBundleInfoByName(symbolicName); boolean fixPackageMissing = sourceBundleInfo != null && sourceBundleInfo.isMissing(); boolean sameVersion = (targetBundleInfo != null && sourceBundleInfo != null && targetBundleInfo.getVersion().equals(sourceBundleInfo.getVersion())); if (fixPackageMissing || sameVersion) { result = true; } return result; }