Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2017-10-04 11:59:26 -0400
committerAlexander Kurtakov2017-10-04 11:59:26 -0400
commit6b2022c1f96f0dc90f50e66ab35b03b7906b2391 (patch)
tree17124062723bca16a5aae2c815ed9ba45d6a0bd9
parent92ad1b3c439a625fc163ef10262b879381e87be0 (diff)
downloadrt.equinox.p2-6b2022c1f96f0dc90f50e66ab35b03b7906b2391.tar.gz
rt.equinox.p2-6b2022c1f96f0dc90f50e66ab35b03b7906b2391.tar.xz
rt.equinox.p2-6b2022c1f96f0dc90f50e66ab35b03b7906b2391.zip
Bug 525581 - Move directorywatcher activator to use FrameworkUtil I20171004-2000
instead of the deprecated PackageAdmin service. Change-Id: Ida29c463b2d4a7c3f2717757bab39ce74a3faaac Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/Activator.java4
1 files changed, 1 insertions, 3 deletions
diff --git a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/Activator.java b/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/Activator.java
index 762f5be31..680b6c1c8 100644
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/Activator.java
+++ b/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/Activator.java
@@ -19,7 +19,6 @@ import org.eclipse.equinox.p2.core.IProvisioningAgent;
import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
import org.osgi.framework.*;
-import org.osgi.service.packageadmin.PackageAdmin;
/**
* Bundle activator for directory watcher bundle.
@@ -52,8 +51,7 @@ public class Activator implements BundleActivator {
}
public static URI getDefaultRepositoryLocation(Object object, String repositoryName) {
- PackageAdmin packageAdmin = ServiceHelper.getService(context, PackageAdmin.class);
- Bundle bundle = packageAdmin.getBundle(object.getClass());
+ Bundle bundle = FrameworkUtil.getBundle(object.getClass());
BundleContext context = bundle.getBundleContext();
File base = context.getDataFile(""); //$NON-NLS-1$
File result = new File(base, "listener_" + repositoryName.hashCode()); //$NON-NLS-1$

Back to the top