Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSusan Franklin2008-11-18 17:07:17 -0500
committerSusan Franklin2008-11-18 17:07:17 -0500
commita72b100f49679052f3bde75ac6295f89ec16640e (patch)
tree65f43e94d1d416528dd9316e1c0714223b96b75d /bundles/org.eclipse.equinox.p2.updatechecker
parentb51088b194c52eff878c9d2e9bade2cba5fa0978 (diff)
downloadrt.equinox.p2-a72b100f49679052f3bde75ac6295f89ec16640e.tar.gz
rt.equinox.p2-a72b100f49679052f3bde75ac6295f89ec16640e.tar.xz
rt.equinox.p2-a72b100f49679052f3bde75ac6295f89ec16640e.zip
Bug 255724 - Test failures in UpdateChecker tests
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.updatechecker')
-rw-r--r--bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/p2/updatechecker/Activator.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/p2/updatechecker/UpdateChecker.java (renamed from bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/provisional/p2/updatechecker/UpdateChecker.java)5
2 files changed, 8 insertions, 5 deletions
diff --git a/bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/p2/updatechecker/Activator.java b/bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/p2/updatechecker/Activator.java
index afbdf8f1d..d6a6e1fe4 100644
--- a/bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/p2/updatechecker/Activator.java
+++ b/bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/p2/updatechecker/Activator.java
@@ -10,8 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.internal.p2.updatechecker;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
+import org.eclipse.equinox.internal.provisional.p2.updatechecker.IUpdateChecker;
+import org.osgi.framework.*;
/**
* Activator class that registers the update checker service.
@@ -19,6 +19,7 @@ import org.osgi.framework.BundleContext;
public class Activator implements BundleActivator {
public static final String ID = "org.eclipse.equinox.p2.updatechecker"; //$NON-NLS-1$
private static BundleContext context;
+ private ServiceRegistration registrationChecker;
public static BundleContext getContext() {
return context;
@@ -26,9 +27,10 @@ public class Activator implements BundleActivator {
public void start(BundleContext bundleContext) throws Exception {
Activator.context = bundleContext;
+ registrationChecker = context.registerService(IUpdateChecker.SERVICE_NAME, new UpdateChecker(), null);
}
public void stop(BundleContext bundleContext) throws Exception {
- Activator.context = null;
+ registrationChecker.unregister();
}
}
diff --git a/bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/provisional/p2/updatechecker/UpdateChecker.java b/bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/p2/updatechecker/UpdateChecker.java
index 75169c7f6..60413a152 100644
--- a/bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/provisional/p2/updatechecker/UpdateChecker.java
+++ b/bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/p2/updatechecker/UpdateChecker.java
@@ -8,7 +8,9 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.updatechecker;
+package org.eclipse.equinox.internal.p2.updatechecker;
+
+import org.eclipse.equinox.internal.provisional.p2.updatechecker.*;
import java.net.URI;
import java.text.SimpleDateFormat;
@@ -16,7 +18,6 @@ import java.util.*;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.equinox.internal.p2.core.helpers.*;
-import org.eclipse.equinox.internal.p2.updatechecker.Activator;
import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
import org.eclipse.equinox.internal.provisional.p2.core.repository.IRepositoryManager;
import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;

Back to the top