Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug302582d.java')
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug302582d.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug302582d.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug302582d.java
index 5b58f02ce..5a6607ccd 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug302582d.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug302582d.java
@@ -1,11 +1,11 @@
/*******************************************************************************
* Copyright (c) 2010, 2017 IBM Corporation and others.
- *
+ *
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
@@ -17,7 +17,9 @@ import java.io.File;
import java.util.Iterator;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.equinox.internal.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.p2.core.*;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.IProvisioningAgentProvider;
+import org.eclipse.equinox.p2.core.ProvisionException;
import org.eclipse.equinox.p2.engine.IProfileRegistry;
import org.eclipse.equinox.p2.engine.IProvisioningPlan;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
@@ -45,7 +47,7 @@ public class Bug302582d extends AbstractProvisioningTest {
IProvisioningAgentProvider provider = getAgentProvider();
agent = provider.createAgent(tempFolder.toURI());
- profileRegistry = ((IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME));
+ profileRegistry = agent.getService(IProfileRegistry.class);
assertNotNull(profileRegistry.getProfile(profileLoadedId));
}
@@ -56,7 +58,7 @@ public class Bug302582d extends AbstractProvisioningTest {
}
public void testInstall() {
- IMetadataRepositoryManager mgr = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
+ IMetadataRepositoryManager mgr = agent.getService(IMetadataRepositoryManager.class);
try {
repo = mgr.loadRepository(getTestData("test data bug bug302582d repo", "testData/bug302582d/repo").toURI(), null);
} catch (ProvisionException e) {

Back to the top