Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/AbstractProvisioningTest.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/FailingMetadataRepositoryFactory.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/TestData.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core/AggregateQueryTest.java30
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core/QueryTest.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/EngineTest.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/InstructionParserTest.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/ProvisioningEventTest.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/TouchpointTest.java16
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/gc/GCCleanTest.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/PersistFragment.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/JarURLMetadataRepositoryTest.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/mirror/MetadataMirrorApplicationTest.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/mirror/NewMirrorApplicationMetadataTest.java12
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/perf/MetadataRepositoryPerformanceTest.java1
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/perf/PublisherPerformanceTest.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ActualChangeRequestTest.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AgentPlanTestInExternalInstance.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AgentPlanTestInExternalInstanceForCohostedMode.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug311330.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SimulatedSharedInstallTest.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/UpdateForTwoIUs.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/TestArtifactRepository.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/BundlesActionTest.java22
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/EquinoxLauncherCUActionTest.java11
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/FeaturesActionTest.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/JREActionTest.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductFileTest.java20
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/RootFilesActionTest.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/AbstractSharedBundleProductTest.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/SimpleConfiguratorUtilsTest.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/testserver/helper/TestServerController.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddJVMArgumentActionTest.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddProgramArgumentActionTest.java28
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddProgramPropertyActionTest.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddRepositoryActionTest.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddSourceBundleActionTest.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/CheckTrustActionTest.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/ChmodActionTest.java16
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/CollectActionTest.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/EclipseTouchpointTest.java20
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/InstallBundleActionTest.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/InstallFeatureActionTest.java12
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/JVMArgumentActionLogicTest.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/LinkActionTest.java16
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/MarkStartedActionTest.java18
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveJVMArgumentActionTest.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveProgramArgumentActionTest.java16
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveProgramPropertyActionTest.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveRepositoryActionTest.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveSourceBundleActionTest.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetFrameworkDependentPropertyActionTest.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetFrameworkIndependentPropertyActionTest.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetLauncherNameActionTest.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetProgramPropertyActionTest.java16
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetStartLevelActionTest.java18
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/UninstallBundleActionTest.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/UninstallFeatureActionTest.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/UtilTest.java11
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/CheckAndPromptNativePackageWindowsRegistryTest.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/ChmodActionTest.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/CleanupzipActionTest.java12
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/CollectActionTest.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/CopyActionTest.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/LinkActionTest.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/MkdirActionTest.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/NativeTouchpointTest.java13
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/RemoveActionTest.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/RmdirActionTest.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/UnzipActionTest.java16
70 files changed, 276 insertions, 271 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/AbstractProvisioningTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/AbstractProvisioningTest.java
index e2d477502..7d07c6dea 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/AbstractProvisioningTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/AbstractProvisioningTest.java
@@ -789,7 +789,7 @@ public abstract class AbstractProvisioningTest extends TestCase {
* already exists. The returned profile will be removed automatically
* in the tearDown method.
*/
- public IProfile createProfile(String name, Map properties) {
+ public IProfile createProfile(String name, Map<String, String> properties) {
//remove any existing profile with the same name
IProfileRegistry profileRegistry = getProfileRegistry();
profileRegistry.removeProfile(name);
@@ -830,7 +830,7 @@ public abstract class AbstractProvisioningTest extends TestCase {
return repo;
}
- protected IArtifactRepository createArtifactRepository(URI location, Map properties) throws ProvisionException {
+ protected IArtifactRepository createArtifactRepository(URI location, Map<String, String> properties) throws ProvisionException {
IArtifactRepositoryManager artifactRepositoryManager = getArtifactRepositoryManager();
IArtifactRepository repo = artifactRepositoryManager.createRepository(location, "artifact", IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, properties);
artifactRepositoryManager.removeRepository(repo.getLocation());
@@ -864,7 +864,7 @@ public abstract class AbstractProvisioningTest extends TestCase {
return (Transport) getAgent().getService(Transport.SERVICE_NAME);
}
- protected IMetadataRepository createMetadataRepository(URI location, Map properties) throws ProvisionException {
+ protected IMetadataRepository createMetadataRepository(URI location, Map<String, String> properties) throws ProvisionException {
IMetadataRepositoryManager metadataRepositoryManager = getMetadataRepositoryManager();
IMetadataRepository repo = metadataRepositoryManager.createRepository(location, "metadata", IMetadataRepositoryManager.TYPE_SIMPLE_REPOSITORY, properties);
metadataRepos.add(repo);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/FailingMetadataRepositoryFactory.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/FailingMetadataRepositoryFactory.java
index 2c6a12334..54e6a6586 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/FailingMetadataRepositoryFactory.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/FailingMetadataRepositoryFactory.java
@@ -1,10 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * Copyright (c) 2009, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -25,7 +25,7 @@ public class FailingMetadataRepositoryFactory extends MetadataRepositoryFactory
public static boolean FAIL = false;
@Override
- public IMetadataRepository create(URI location, String name, String type, Map properties) throws ProvisionException {
+ public IMetadataRepository create(URI location, String name, String type, Map<String, String> properties) throws ProvisionException {
if (FAIL)
throw new RuntimeException("Exception thrown deliberately as part of test");
throw new ProvisionException(new Status(IStatus.ERROR, TestActivator.PI_PROV_TESTS, ProvisionException.REPOSITORY_NOT_FOUND, "", null));
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/TestData.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/TestData.java
index ddb4dd90c..1d995b403 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/TestData.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/TestData.java
@@ -160,12 +160,12 @@ public class TestData {
* @param input2
* @throws IOException
*/
- public static void assertContains(Map fileMap, ZipInputStream input2, boolean compareContent) throws IOException {
+ public static void assertContains(Map<String, Object[]> fileMap, ZipInputStream input2, boolean compareContent) throws IOException {
Map<String, Object[]> jar2 = getEntries(input2);
for (Iterator<String> i = fileMap.keySet().iterator(); i.hasNext();) {
String name = i.next();
- Object[] file1 = (Object[]) fileMap.get(name);
+ Object[] file1 = fileMap.get(name);
Object[] file2 = jar2.remove(name);
Assert.assertNotNull(file2);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core/AggregateQueryTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core/AggregateQueryTest.java
index 238b8eb2a..73cb77539 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core/AggregateQueryTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core/AggregateQueryTest.java
@@ -20,16 +20,16 @@ import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
*/
public class AggregateQueryTest extends TestCase {
- public List getABCDE() {
+ public List<String> getABCDE() {
return Arrays.asList("A", "B", "C", "D", "E");
}
- public List get123() {
+ public List<String> get123() {
return Arrays.asList("1", "2", "3");
}
public void testEmptyCompositeQuery() {
- IQuery<Object> query = QueryUtil.createPipeQuery(Collections.<IQuery<Object>> emptySet());
+ IQuery<String> query = QueryUtil.createPipeQuery(Collections.<IQuery<String>> emptySet());
query.perform(getABCDE().iterator());
// We should not throw an exception. No guarantee on what perform
// will return in this case
@@ -130,26 +130,26 @@ public class AggregateQueryTest extends TestCase {
}
public void testIntersection() {
- IQuery ABC = new MatchQuery() {
+ IQuery<String> ABC = new MatchQuery<String>() {
@Override
- public boolean isMatch(Object candidate) {
+ public boolean isMatch(String candidate) {
if (candidate.equals("A") || candidate.equals("B") || candidate.equals("C"))
return true;
return false;
}
};
- IQuery BCDE = new MatchQuery() {
+ IQuery<String> BCDE = new MatchQuery<String>() {
@Override
- public boolean isMatch(Object candidate) {
+ public boolean isMatch(String candidate) {
if (candidate.equals("B") || candidate.equals("C") || candidate.equals("D") || candidate.equals("E"))
return true;
return false;
}
};
- IQuery compoundQuery = QueryUtil.createCompoundQuery(ABC, BCDE, true);
- IQueryResult result = compoundQuery.perform(getABCDE().iterator());
+ IQuery<String> compoundQuery = QueryUtil.createCompoundQuery(ABC, BCDE, true);
+ IQueryResult<String> result = compoundQuery.perform(getABCDE().iterator());
assertEquals("1.0", AbstractProvisioningTest.queryResultSize(result), 2);
AbstractProvisioningTest.assertContains("1.1", result, "B");
AbstractProvisioningTest.assertContains("1.2", result, "C");
@@ -190,26 +190,26 @@ public class AggregateQueryTest extends TestCase {
}
public void testUnion() {
- IQuery ABC = new MatchQuery() {
+ IQuery<String> ABC = new MatchQuery<String>() {
@Override
- public boolean isMatch(Object candidate) {
+ public boolean isMatch(String candidate) {
if (candidate.equals("A") || candidate.equals("B") || candidate.equals("C"))
return true;
return false;
}
};
- IQuery BCDE = new MatchQuery() {
+ IQuery<String> BCDE = new MatchQuery<String>() {
@Override
- public boolean isMatch(Object candidate) {
+ public boolean isMatch(String candidate) {
if (candidate.equals("B") || candidate.equals("C") || candidate.equals("D") || candidate.equals("E"))
return true;
return false;
}
};
- IQuery compoundQuery = QueryUtil.createCompoundQuery(ABC, BCDE, false);
- IQueryResult result = compoundQuery.perform(getABCDE().iterator());
+ IQuery<String> compoundQuery = QueryUtil.createCompoundQuery(ABC, BCDE, false);
+ IQueryResult<String> result = compoundQuery.perform(getABCDE().iterator());
assertEquals("1.0", AbstractProvisioningTest.queryResultSize(result), 5);
AbstractProvisioningTest.assertContains("1.1", result, "A");
AbstractProvisioningTest.assertContains("1.2", result, "B");
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core/QueryTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core/QueryTest.java
index ed9030c0b..40390994e 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core/QueryTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core/QueryTest.java
@@ -83,7 +83,7 @@ public class QueryTest extends TestCase {
}
public void testLimitQuery0() {
- List items = Arrays.asList("red", "green", "blue");
+ List<String> items = Arrays.asList("red", "green", "blue");
IQuery query = new AnyStringQuery();
IQuery limitQuery = QueryUtil.createLimitQuery(query, 0);
IQueryResult collector = limitQuery.perform(items.iterator());
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/EngineTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/EngineTest.java
index dcce51747..de69fbe25 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/EngineTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/EngineTest.java
@@ -523,7 +523,7 @@ public class EngineTest extends AbstractProvisioningTest {
ActionNPEPhase phase = new ActionNPEPhase(true);
PhaseSet phaseSet = new TestPhaseSet(phase);
- Iterator<IInstallableUnit> ius = getInstallableUnits(profile);
+ Iterator ius = getInstallableUnits(profile);
assertFalse(ius.hasNext());
IProvisioningPlan plan = engine.createPlan(profile, null);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/InstructionParserTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/InstructionParserTest.java
index 736b2c7dc..518434acc 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/InstructionParserTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/InstructionParserTest.java
@@ -41,12 +41,12 @@ public class InstructionParserTest extends AbstractProvisioningTest {
public static class TestAction extends ProvisioningAction {
@Override
- public IStatus execute(Map parameters) {
+ public IStatus execute(Map<String, Object> parameters) {
return null;
}
@Override
- public IStatus undo(Map parameters) {
+ public IStatus undo(Map<String, Object> parameters) {
return null;
}
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/ProvisioningEventTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/ProvisioningEventTest.java
index 7a0b3fb72..ebfac6cb7 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/ProvisioningEventTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/ProvisioningEventTest.java
@@ -202,7 +202,7 @@ public class ProvisioningEventTest extends AbstractProvisioningTest {
final String testLocation = "http://download.eclipse.org/releases/juno";
// remove the existing location in case it has
- Map args = new HashMap();
+ Map<String, Object> args = new HashMap<>();
args.put(ActionConstants.PARM_AGENT, getAgent());
args.put("location", testLocation);
args.put("type", Integer.toString(IRepository.TYPE_ARTIFACT));
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/TouchpointTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/TouchpointTest.java
index 86eae8e42..de7d1ddcb 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/TouchpointTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/TouchpointTest.java
@@ -38,25 +38,25 @@ public class TouchpointTest extends AbstractProvisioningTest {
}
@Override
- public IStatus completeOperand(IProfile profile, Map parameters) {
+ public IStatus completeOperand(IProfile profile, Map<String, Object> parameters) {
completeOperand++;
return super.completeOperand(profile, parameters);
}
@Override
- public IStatus completePhase(IProgressMonitor monitor, IProfile profile, String phaseId, Map touchpointParameters) {
+ public IStatus completePhase(IProgressMonitor monitor, IProfile profile, String phaseId, Map<String, Object> touchpointParameters) {
completePhase++;
return super.completePhase(monitor, profile, phaseId, touchpointParameters);
}
@Override
- public IStatus initializeOperand(IProfile profile, Map parameters) {
+ public IStatus initializeOperand(IProfile profile, Map<String, Object> parameters) {
initializeOperand++;
return super.initializeOperand(profile, parameters);
}
@Override
- public IStatus initializePhase(IProgressMonitor monitor, IProfile profile, String phaseId, Map touchpointParameters) {
+ public IStatus initializePhase(IProgressMonitor monitor, IProfile profile, String phaseId, Map<String, Object> touchpointParameters) {
initializePhase++;
return super.initializePhase(monitor, profile, phaseId, touchpointParameters);
}
@@ -71,7 +71,7 @@ public class TouchpointTest extends AbstractProvisioningTest {
public static class OperandTestTouchpoint extends TestTouchpoint {
@Override
- public IStatus completeOperand(IProfile profile, Map parameters) {
+ public IStatus completeOperand(IProfile profile, Map<String, Object> parameters) {
assertEquals(1, initializeOperand);
assertEquals(0, completeOperand);
super.completeOperand(profile, parameters);
@@ -81,7 +81,7 @@ public class TouchpointTest extends AbstractProvisioningTest {
}
@Override
- public IStatus initializeOperand(IProfile profile, Map parameters) {
+ public IStatus initializeOperand(IProfile profile, Map<String, Object> parameters) {
assertEquals(0, initializeOperand);
assertEquals(0, completeOperand);
assertTrue(parameters.containsKey("TestPhase.initializeOperand"));
@@ -99,7 +99,7 @@ public class TouchpointTest extends AbstractProvisioningTest {
public static class PhaseTestTouchpoint extends TestTouchpoint {
@Override
- public IStatus completePhase(IProgressMonitor monitor, IProfile profile, String phaseId, Map parameters) {
+ public IStatus completePhase(IProgressMonitor monitor, IProfile profile, String phaseId, Map<String, Object> parameters) {
assertEquals(1, initializePhase);
assertEquals(0, completePhase);
super.completePhase(monitor, profile, phaseId, parameters);
@@ -109,7 +109,7 @@ public class TouchpointTest extends AbstractProvisioningTest {
}
@Override
- public IStatus initializePhase(IProgressMonitor monitor, IProfile profile, String phaseId, Map parameters) {
+ public IStatus initializePhase(IProgressMonitor monitor, IProfile profile, String phaseId, Map<String, Object> parameters) {
assertEquals(0, initializePhase);
assertEquals(0, completePhase);
assertTrue(parameters.containsKey("TestPhase.initializePhase"));
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/gc/GCCleanTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/gc/GCCleanTest.java
index f350ec9b0..e17bde096 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/gc/GCCleanTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/gc/GCCleanTest.java
@@ -31,7 +31,7 @@ public class GCCleanTest extends AbstractProvisioningTest {
private IArtifactRepository createRepository(File location) throws ProvisionException {
URI repositoryURI = location.toURI();
- IArtifactRepository repo = getArtifactRepositoryManager().createRepository(repositoryURI, "test", IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, new HashMap());
+ IArtifactRepository repo = getArtifactRepositoryManager().createRepository(repositoryURI, "test", IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, new HashMap<>());
ArtifactDescriptor d1 = new ArtifactDescriptor(new ArtifactKey("osgi.bundle", "a", Version.create("1.0.0")));
ArtifactDescriptor d2 = new ArtifactDescriptor(new ArtifactKey("osgi.bundle", "a", Version.create("2.0.0")));
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/PersistFragment.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/PersistFragment.java
index 45194587c..0aae2a457 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/PersistFragment.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/PersistFragment.java
@@ -44,7 +44,7 @@ public class PersistFragment extends AbstractProvisioningTest {
public void testPersistFragmentIn36Repo() throws ProvisionException {
String orExpression = "providedCapabilities.exists(pc | pc.namespace == 'org.eclipse.equinox.p2.iu' && (pc.name == 'org.eclipse.mylyn34' || pc.name == 'org.eclipse.mylyn35'))";
IExpression expr = ExpressionUtil.parse(orExpression);
- IMatchExpression matchExpression = ExpressionUtil.getFactory().matchExpression(expr);
+ IMatchExpression<IInstallableUnit> matchExpression = ExpressionUtil.getFactory().matchExpression(expr);
IRequirement orRequirement = MetadataFactory.createRequirement(matchExpression, null, 0, 1, true);
IInstallableUnitFragment fragment = createIUFragment(createEclipseIU("A"), "MyHost", Version.createOSGi(1, 0, 0), new IRequirement[] {orRequirement}, null, null);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/JarURLMetadataRepositoryTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/JarURLMetadataRepositoryTest.java
index 903f7c6e2..7f2f4a9ae 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/JarURLMetadataRepositoryTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/JarURLMetadataRepositoryTest.java
@@ -78,7 +78,7 @@ public class JarURLMetadataRepositoryTest extends AbstractProvisioningTest {
File testRepo = new File(tempDir, "testRepo");
FileUtils.deleteAll(testRepo);
testRepo.mkdir();
- Map properties = new HashMap();
+ Map<String, String> properties = new HashMap<>();
properties.put(IRepository.PROP_COMPRESSED, "true");
IMetadataRepository repo = manager.createRepository(testRepo.toURI(), "TestRepo", IMetadataRepositoryManager.TYPE_SIMPLE_REPOSITORY, properties);
//populate with some basic metadata
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/mirror/MetadataMirrorApplicationTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/mirror/MetadataMirrorApplicationTest.java
index 1b5415fca..d92b0625e 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/mirror/MetadataMirrorApplicationTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/mirror/MetadataMirrorApplicationTest.java
@@ -68,7 +68,7 @@ public class MetadataMirrorApplicationTest extends AbstractProvisioningTest {
*/
private void runMirrorApplication(String message, final String[] args) throws Exception {
MirrorApplication application = new MirrorApplication();
- Map map = new HashMap();
+ Map<String, String> map = new HashMap<>();
map.put("metadataOrArtifacts", "metadata");
application.setInitializationData(null, null, map);
application.initializeFromArguments(args);
@@ -733,7 +733,7 @@ public class MetadataMirrorApplicationTest extends AbstractProvisioningTest {
public void testExistingArtifactRepoProperties() {
//Setup: create the destination
String name = "Destination Name";
- Map properties = null; //default properties
+ Map<String, String> properties = null; //default properties
try {
//create the repository and get the resulting properties
properties = getMetadataRepositoryManager().createRepository(destRepoLocation.toURI(), name, IMetadataRepositoryManager.TYPE_SIMPLE_REPOSITORY, properties).getProperties();
@@ -880,7 +880,7 @@ public class MetadataMirrorApplicationTest extends AbstractProvisioningTest {
//Setup: create the destination
try {
String name = "Destination Name " + destRepoLocation;
- Map property = new HashMap();
+ Map<String, String> property = new HashMap<>();
property.put(IRepository.PROP_COMPRESSED, "true");
getMetadataRepositoryManager().createRepository(destRepoLocation.toURI(), name, IMetadataRepositoryManager.TYPE_SIMPLE_REPOSITORY, property);
} catch (ProvisionException e) {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/mirror/NewMirrorApplicationMetadataTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/mirror/NewMirrorApplicationMetadataTest.java
index 134e641e2..b54d0bd9b 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/mirror/NewMirrorApplicationMetadataTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/mirror/NewMirrorApplicationMetadataTest.java
@@ -134,16 +134,16 @@ public class NewMirrorApplicationMetadataTest extends AbstractProvisioningTest {
* Takes 2 QueryResults, compares them, and returns the number of unique keys
* Needed to verify that only the appropriate number of files have been transfered by the mirror application
*/
- private int getNumUnique(IQueryResult c1, IQueryResult c2) {
- Object[] repo1 = c1.toArray(IInstallableUnit.class);
- Object[] repo2 = c2.toArray(IInstallableUnit.class);
+ private int getNumUnique(IQueryResult<IInstallableUnit> c1, IQueryResult<IInstallableUnit> c2) {
+ IInstallableUnit[] repo1 = c1.toArray(IInstallableUnit.class);
+ IInstallableUnit[] repo2 = c2.toArray(IInstallableUnit.class);
//initialize to the size of both QueryResults
int numKeys = repo1.length + repo2.length;
for (int i = 0; i < repo1.length; i++) {
for (int j = 0; j < repo2.length; j++) {
- if (isEqual((IInstallableUnit) repo1[i], (IInstallableUnit) repo2[j]))
+ if (isEqual(repo1[i], repo2[j]))
numKeys--;
//identical keys has bee found, therefore the number of unique keys is one less than previously thought
}
@@ -760,7 +760,7 @@ public class NewMirrorApplicationMetadataTest extends AbstractProvisioningTest {
public void testExistingArtifactRepoProperties() {
//Setup: create the destination
String name = "Destination Name";
- Map properties = null; //default properties
+ Map<String, String> properties = null; //default properties
try {
//create the repository and get the resulting properties
properties = getMetadataRepositoryManager().createRepository(destRepoLocation.toURI(), name, IMetadataRepositoryManager.TYPE_SIMPLE_REPOSITORY, properties).getProperties();
@@ -904,7 +904,7 @@ public class NewMirrorApplicationMetadataTest extends AbstractProvisioningTest {
//Setup: create the destination
try {
String name = "Destination Name " + destRepoLocation;
- Map property = new HashMap();
+ Map<String, String> property = new HashMap<>();
property.put(IRepository.PROP_COMPRESSED, "true");
getMetadataRepositoryManager().createRepository(destRepoLocation.toURI(), name, IMetadataRepositoryManager.TYPE_SIMPLE_REPOSITORY, property);
} catch (ProvisionException e) {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/perf/MetadataRepositoryPerformanceTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/perf/MetadataRepositoryPerformanceTest.java
index 0ae7fa5a5..862b7b600 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/perf/MetadataRepositoryPerformanceTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/perf/MetadataRepositoryPerformanceTest.java
@@ -49,6 +49,7 @@ public class MetadataRepositoryPerformanceTest extends ProvisioningPerformanceTe
public void testQueryLocalRepository() {
final int IU_COUNT = 3000;
new PerformanceTestRunner() {
+ @SuppressWarnings("unchecked")
IQuery<IInstallableUnit>[] queries = new IQuery[IU_COUNT];
@Override
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/perf/PublisherPerformanceTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/perf/PublisherPerformanceTest.java
index a28f27c00..3ace0eeec 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/perf/PublisherPerformanceTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/perf/PublisherPerformanceTest.java
@@ -26,6 +26,7 @@ public class PublisherPerformanceTest extends ProvisioningPerformanceTest {
public void testQueryPublisherResult() {
final int IU_COUNT = 3000;
new PerformanceTestRunner() {
+ @SuppressWarnings("unchecked")
IQuery<IInstallableUnit>[] queries = new IQuery[IU_COUNT];
PublisherResult result;
@@ -56,6 +57,7 @@ public class PublisherPerformanceTest extends ProvisioningPerformanceTest {
public void testLimitQueryPublisherResult() {
final int IU_COUNT = 3000;
new PerformanceTestRunner() {
+ @SuppressWarnings("unchecked")
IQuery<IInstallableUnit>[] queries = new IQuery[IU_COUNT];
PublisherResult result;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ActualChangeRequestTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ActualChangeRequestTest.java
index 22ce22b65..838a6b71d 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ActualChangeRequestTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ActualChangeRequestTest.java
@@ -14,6 +14,7 @@ import java.util.Map;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.director.ProfileChangeRequest;
import org.eclipse.equinox.internal.provisional.p2.director.PlannerStatus;
+import org.eclipse.equinox.internal.provisional.p2.director.RequestStatus;
import org.eclipse.equinox.p2.engine.*;
import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.planner.IPlanner;
@@ -64,7 +65,7 @@ public class ActualChangeRequestTest extends AbstractProvisioningTest {
IProvisioningPlan plan2 = planner.getProvisioningPlan(req2, null, null);
assertEquals(IStatus.OK, plan2.getStatus().getSeverity());
assertNull(((PlannerStatus) plan2.getStatus()).getRequestChanges().get(b));
- Map m = ((PlannerStatus) plan2.getStatus()).getRequestSideEffects();
+ Map<IInstallableUnit, RequestStatus> m = ((PlannerStatus) plan2.getStatus()).getRequestSideEffects();
m.toString();
assertEquals(IStatus.OK, ((PlannerStatus) plan2.getStatus()).getRequestChanges().get(a).getSeverity());
engine.perform(plan2, null);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AgentPlanTestInExternalInstance.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AgentPlanTestInExternalInstance.java
index 24f8a99c4..4820de0c3 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AgentPlanTestInExternalInstance.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AgentPlanTestInExternalInstance.java
@@ -10,7 +10,8 @@ package org.eclipse.equinox.p2.tests.planner;
import java.lang.reflect.Field;
import java.net.URI;
-import java.util.Properties;
+import java.util.HashMap;
+import java.util.Map;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.equinox.internal.p2.director.ProfileChangeRequest;
import org.eclipse.equinox.internal.p2.engine.SimpleProfileRegistry;
@@ -36,8 +37,8 @@ public class AgentPlanTestInExternalInstance extends AbstractProvisioningTest {
fail();
}
createProfile("agent");
- Properties p = new Properties();
- p.setProperty("org.eclipse.equinox.p2.planner.resolveMetaRequirements", "false");
+ Map<String, String> p = new HashMap<>();
+ p.put("org.eclipse.equinox.p2.planner.resolveMetaRequirements", "false");
createProfile("installation", p);
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AgentPlanTestInExternalInstanceForCohostedMode.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AgentPlanTestInExternalInstanceForCohostedMode.java
index d2eb3c91a..d249588a7 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AgentPlanTestInExternalInstanceForCohostedMode.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AgentPlanTestInExternalInstanceForCohostedMode.java
@@ -10,7 +10,8 @@ package org.eclipse.equinox.p2.tests.planner;
import java.lang.reflect.Field;
import java.net.URI;
-import java.util.Properties;
+import java.util.HashMap;
+import java.util.Map;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.equinox.internal.p2.director.ProfileChangeRequest;
import org.eclipse.equinox.internal.p2.engine.SimpleProfileRegistry;
@@ -36,8 +37,8 @@ public class AgentPlanTestInExternalInstanceForCohostedMode extends AbstractProv
fail();
}
createProfile("agent");
- Properties p = new Properties();
- p.setProperty("org.eclipse.equinox.p2.planner.resolveMetaRequirements", "true");
+ Map<String, String> p = new HashMap<>();
+ p.put("org.eclipse.equinox.p2.planner.resolveMetaRequirements", "true");
createProfile("installation", p);
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug311330.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug311330.java
index 29c56c535..4fc13ce00 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug311330.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug311330.java
@@ -1,10 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2010 Sonatype, Inc and others.
+ * Copyright (c) 2010, 2017 Sonatype, Inc and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
@@ -33,7 +33,7 @@ public class Bug311330 extends AbstractProvisioningTest {
// Force negation of rwt.
RequiredCapability req1 = new RequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, "org.eclipse.rap.jface", new VersionRange("[1.1.0, 1.4.0)"), null, 0, 0, false, null);
- ArrayList<IRequirement> reqs = new ArrayList();
+ ArrayList<IRequirement> reqs = new ArrayList<>();
reqs.add(req1);
request.addExtraRequirements(reqs);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SimulatedSharedInstallTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SimulatedSharedInstallTest.java
index 021a79408..26c46c648 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SimulatedSharedInstallTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SimulatedSharedInstallTest.java
@@ -87,7 +87,7 @@ public class SimulatedSharedInstallTest extends AbstractProvisioningTest {
// everything else is delegated
@Override
- public Map getInstallableUnitProperties(IInstallableUnit iu) {
+ public Map<String, String> getInstallableUnitProperties(IInstallableUnit iu) {
return profile.getInstallableUnitProperties(iu);
}
@@ -102,7 +102,7 @@ public class SimulatedSharedInstallTest extends AbstractProvisioningTest {
}
@Override
- public Map getProperties() {
+ public Map<String, String> getProperties() {
return profile.getProperties();
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/UpdateForTwoIUs.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/UpdateForTwoIUs.java
index 87e0616f7..9e87a25f9 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/UpdateForTwoIUs.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/UpdateForTwoIUs.java
@@ -36,7 +36,7 @@ public class UpdateForTwoIUs extends AbstractProvisioningTest {
String orExpression = "providedCapabilities.exists(pc | pc.namespace == 'org.eclipse.equinox.p2.iu' && (pc.name == 'B' || pc.name == 'C'))";
IExpression expr = ExpressionUtil.parse(orExpression);
- IMatchExpression matchExpression = ExpressionUtil.getFactory().matchExpression(expr);
+ IMatchExpression<IInstallableUnit> matchExpression = ExpressionUtil.getFactory().matchExpression(expr);
Collection<IMatchExpression<IInstallableUnit>> updateExpression = new ArrayList<>();
updateExpression.add(matchExpression);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/TestArtifactRepository.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/TestArtifactRepository.java
index ba72aa144..9a4a6329c 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/TestArtifactRepository.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/TestArtifactRepository.java
@@ -121,7 +121,7 @@ public class TestArtifactRepository implements IArtifactRepository {
public TestArtifactRepository(IProvisioningAgent agent) {
this.agent = agent;
- repo = new HashMap/*<IArtifactDescriptor, byte[]>*/();
+ repo = new HashMap<>();
}
@Override
@@ -289,7 +289,7 @@ public class TestArtifactRepository implements IArtifactRepository {
}
@Override
- public Map getProperties() {
+ public Map<String, String> getProperties() {
return OrderedProperties.unmodifiableProperties(properties);
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/BundlesActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/BundlesActionTest.java
index e47cb5268..35542a55e 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/BundlesActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/BundlesActionTest.java
@@ -196,14 +196,14 @@ public class BundlesActionTest extends ActionTest {
IArtifactKey key1 = ArtifactKey.parse("osgi.bundle,test1,0.1.0");//$NON-NLS-1$
ZipInputStream zis = artifactRepository.getZipInputStream(key1);
- Map fileMap = getFileMap(new HashMap(), new File[] {TEST_FILE1}, new Path(TEST_FILE1.getAbsolutePath()));
+ Map<String, Object[]> fileMap = getFileMap(new HashMap<>(), new File[] {TEST_FILE1}, new Path(TEST_FILE1.getAbsolutePath()));
TestData.assertContains(fileMap, zis, true);
}
private void verifyBundle1() {
- ArrayList ius = new ArrayList(publisherResult.getIUs(TEST1_PROVBUNDLE_NAME, IPublisherResult.ROOT));
+ ArrayList<IInstallableUnit> ius = new ArrayList<>(publisherResult.getIUs(TEST1_PROVBUNDLE_NAME, IPublisherResult.ROOT));
assertTrue(ius.size() == 1);
- IInstallableUnit bundle1IU = (IInstallableUnit) ius.get(0);
+ IInstallableUnit bundle1IU = ius.get(0);
assertNotNull("1.0", bundle1IU);
assertEquals("1.1", bundle1IU.getVersion(), BUNDLE1_VERSION);
@@ -236,9 +236,9 @@ public class BundlesActionTest extends ActionTest {
}
private void verifyBundle2() {
- ArrayList ius = new ArrayList(publisherResult.getIUs(TEST2_PROVBUNDLE_NAME, IPublisherResult.ROOT));
+ ArrayList<IInstallableUnit> ius = new ArrayList<>(publisherResult.getIUs(TEST2_PROVBUNDLE_NAME, IPublisherResult.ROOT));
assertTrue(ius.size() == 1);
- IInstallableUnit bundle2IU = (IInstallableUnit) ius.get(0);
+ IInstallableUnit bundle2IU = ius.get(0);
assertNotNull(bundle2IU);
assertEquals(bundle2IU.getVersion(), BUNDLE2_VERSION);
@@ -282,10 +282,10 @@ public class BundlesActionTest extends ActionTest {
private void verifyBundle3() {
// also a regression test for bug 393051: manifest headers use uncommon (but valid) capitalization
- ArrayList ius = new ArrayList(publisherResult.getIUs(TEST3_PROVBUNDLE_NAME, IPublisherResult.ROOT));
+ ArrayList<IInstallableUnit> ius = new ArrayList<>(publisherResult.getIUs(TEST3_PROVBUNDLE_NAME, IPublisherResult.ROOT));
assertTrue(ius.size() == 1);
- IInstallableUnit bundle3IU = (IInstallableUnit) ius.get(0);
+ IInstallableUnit bundle3IU = ius.get(0);
IUpdateDescriptor updateDescriptor = bundle3IU.getUpdateDescriptor();
String name = RequiredCapability.extractName(updateDescriptor.getIUsBeingUpdated().iterator().next());
@@ -301,9 +301,9 @@ public class BundlesActionTest extends ActionTest {
}
private void verifyBundle4() {
- ArrayList ius = new ArrayList(publisherResult.getIUs(TEST4_PROVBUNDLE_NAME, IPublisherResult.ROOT));
+ ArrayList<IInstallableUnit> ius = new ArrayList<>(publisherResult.getIUs(TEST4_PROVBUNDLE_NAME, IPublisherResult.ROOT));
assertTrue(ius.size() == 1);
- IInstallableUnit bundle4IU = (IInstallableUnit) ius.get(0);
+ IInstallableUnit bundle4IU = ius.get(0);
assertNotNull("1.0", bundle4IU);
assertEquals("1.1", bundle4IU.getVersion(), BUNDLE4_VERSION);
@@ -318,9 +318,9 @@ public class BundlesActionTest extends ActionTest {
}
private void verifyBundle5() {
- ArrayList ius = new ArrayList(publisherResult.getIUs(TEST5_PROVBUNDLE_NAME, IPublisherResult.ROOT));
+ ArrayList<IInstallableUnit> ius = new ArrayList<>(publisherResult.getIUs(TEST5_PROVBUNDLE_NAME, IPublisherResult.ROOT));
assertTrue(ius.size() == 1);
- IInstallableUnit bundle5IU = (IInstallableUnit) ius.get(0);
+ IInstallableUnit bundle5IU = ius.get(0);
Collection<IRequirement> requirements = bundle5IU.getRequirements();
assertTrue(requirements.size() == 1);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/EquinoxLauncherCUActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/EquinoxLauncherCUActionTest.java
index bfa5960a7..8c89140e7 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/EquinoxLauncherCUActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/EquinoxLauncherCUActionTest.java
@@ -23,7 +23,6 @@ import org.eclipse.equinox.p2.publisher.actions.VersionAdvice;
import org.eclipse.equinox.p2.publisher.eclipse.EquinoxLauncherCUAction;
import org.eclipse.equinox.spi.p2.publisher.PublisherHelper;
-@SuppressWarnings({"unchecked"})
public class EquinoxLauncherCUActionTest extends ActionTest {
private static String a_ID = "iua.source"; //$NON-NLS-1$
@@ -56,10 +55,10 @@ public class EquinoxLauncherCUActionTest extends ActionTest {
}
private void verifyResults() {
- ArrayList ius = new ArrayList(publisherResult.getIUs(null, null));
+ ArrayList<IInstallableUnit> ius = new ArrayList<>(publisherResult.getIUs(null, null));
IInstallableUnit iu;
for (int i = 0; i < ius.size(); i++) {
- iu = (IInstallableUnit) ius.get(i);
+ iu = ius.get(i);
if (iu.getId().equals(flavorArg + EquinoxLauncherCUAction.ORG_ECLIPSE_EQUINOX_LAUNCHER)) {
assertTrue(iu instanceof InstallableUnitFragment);
//verify required capability
@@ -72,7 +71,7 @@ public class EquinoxLauncherCUActionTest extends ActionTest {
verifyProvidedCapability(cap, "org.eclipse.equinox.p2.flavor", flavorArg, Version.create("1.0.0")); //$NON-NLS-1$//$NON-NLS-2$
assertTrue(cap.size() == 2);
- Map prop = iu.getProperties();
+ Map<String, String> prop = iu.getProperties();
assertTrue(prop.get("org.eclipse.equinox.p2.type.fragment").equals("true")); //$NON-NLS-1$ //$NON-NLS-2$
return;
}
@@ -83,7 +82,7 @@ public class EquinoxLauncherCUActionTest extends ActionTest {
@Override
public void setupPublisherResult() {
publisherResult = new PublisherResult();
- ArrayList iuList = new ArrayList();
+ ArrayList<IInstallableUnit> iuList = new ArrayList<>();
iuList.add(mockIU(a_ID, null, true));
iuList.add(mockIU(b_ID, null, true));
iuList.add(mockIU(c_ID, null, false));
@@ -98,7 +97,7 @@ public class EquinoxLauncherCUActionTest extends ActionTest {
versionAdvice.setVersion(IInstallableUnit.NAMESPACE_IU_ID, "org.eclipse.equinox.launcher", Version.emptyVersion); //$NON-NLS-1$
versionAdvice.setVersion("org.eclipse.equinox.p2.flavor", flavorArg, Version.create("1.0.0")); //$NON-NLS-1$//$NON-NLS-2$
- ArrayList versionList = new ArrayList();
+ ArrayList<IVersionAdvice> versionList = new ArrayList<>();
versionList.add(versionAdvice);
expect(publisherInfo.getAdvice(null, true, EquinoxLauncherCUAction.ORG_ECLIPSE_EQUINOX_LAUNCHER, null, IVersionAdvice.class)).andReturn(versionList);
expect(publisherInfo.getAdvice(configSpec, true, EquinoxLauncherCUAction.ORG_ECLIPSE_EQUINOX_LAUNCHER + "." + configSpec, null, IVersionAdvice.class)).andReturn(versionList); //$NON-NLS-1$
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/FeaturesActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/FeaturesActionTest.java
index 2ae685445..eabb75fd9 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/FeaturesActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/FeaturesActionTest.java
@@ -34,7 +34,6 @@ import org.eclipse.equinox.p2.tests.*;
import org.eclipse.equinox.p2.tests.publisher.TestArtifactRepository;
import org.eclipse.equinox.spi.p2.publisher.PublisherHelper;
-@SuppressWarnings({"unchecked"})
public class FeaturesActionTest extends ActionTest {
public static IArtifactKey FOO_KEY = ArtifactKey.parse("org.eclipse.update.feature,foo,1.0.0"); //$NON-NLS-1$
@@ -286,7 +285,7 @@ public class FeaturesActionTest extends ActionTest {
private void verifyArtifacts() throws IOException {
ZipInputStream actualStream = artifactRepository.getZipInputStream(FOO_KEY);
- Map expected = getFileMap(new HashMap<>(), new File[] {new File(root, FOO)}, new Path(new File(root, FOO).getAbsolutePath()));
+ Map<String, Object[]> expected = getFileMap(new HashMap<>(), new File[] {new File(root, FOO)}, new Path(new File(root, FOO).getAbsolutePath()));
TestData.assertContains(expected, actualStream, true);
expected = getFileMap(new HashMap<>(), new File[] {new File(root, BAR)}, new Path(new File(root, BAR).getAbsolutePath()));
@@ -299,7 +298,7 @@ public class FeaturesActionTest extends ActionTest {
//setup metadataRepository with barIU
metadataRepository = new TestMetadataRepository(getAgent(), new IInstallableUnit[] {mockIU(BAR, null)});
- ArrayList adviceCollection = fillAdvice(new ArrayList<>());
+ ArrayList<IPropertyAdvice> adviceCollection = fillAdvice(new ArrayList<>());
expect(publisherInfo.getAdvice(null, false, "bar.feature.jar", barVersion, IPropertyAdvice.class)).andReturn(adviceCollection).anyTimes();
expect(publisherInfo.getAdvice(null, false, "bar", barVersion, IPropertyAdvice.class)).andReturn(adviceCollection).anyTimes();
expect(publisherInfo.getAdvice(null, false, "bar", barVersion, IFeatureRootAdvice.class)).andReturn(Collections.EMPTY_LIST).anyTimes();
@@ -326,7 +325,7 @@ public class FeaturesActionTest extends ActionTest {
expect(publisherInfo.getAdvice(null, false, "foo.feature.group", fooVersion, ITouchpointAdvice.class)).andReturn(new CaptureList<>(tpAdvice)).anyTimes();
}
- private ArrayList fillAdvice(ArrayList adviceCollection) {
+ private ArrayList<IPropertyAdvice> fillAdvice(ArrayList<IPropertyAdvice> adviceCollection) {
Map<String, String> prop = new HashMap<>();
prop.put("key1", "value1"); //$NON-NLS-1$//$NON-NLS-2$
prop.put("key2", "value2"); //$NON-NLS-1$//$NON-NLS-2$
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/JREActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/JREActionTest.java
index 6310a02c3..75955785a 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/JREActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/JREActionTest.java
@@ -183,7 +183,7 @@ public class JREActionTest extends ActionTest {
private void verifyConfigIU(String id, Version jreVersion) {
IInstallableUnit bar = getPublishedUnit("config." + id);
- Map instructions = bar.getTouchpointData().iterator().next().getInstructions();
+ Map<?, ?> instructions = bar.getTouchpointData().iterator().next().getInstructions();
assertTrue(((ITouchpointInstruction) instructions.get("install")).getBody().equals("unzip(source:@artifact, target:${installFolder});")); //$NON-NLS-1$//$NON-NLS-2$
assertTrue(((ITouchpointInstruction) instructions.get("uninstall")).getBody().equals("cleanupzip(source:@artifact, target:${installFolder});")); //$NON-NLS-1$ //$NON-NLS-2$
assertTrue(bar instanceof IInstallableUnitFragment);
@@ -207,7 +207,7 @@ public class JREActionTest extends ActionTest {
FileUtils.copyStream(new FileInputStream(contentBytes[0]), false, content, true);
ZipInputStream zipInputStream = artifactRepository.getZipInputStream(key);
- Map fileMap = new HashMap();
+ Map<String, Object[]> fileMap = new HashMap<>();
fileMap.put(fileName, new Object[] {contentBytes[0], content.toByteArray()});
TestData.assertContains(fileMap, zipInputStream, true);
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductFileTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductFileTest.java
index 9a9d5eedc..173234c25 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductFileTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductFileTest.java
@@ -81,10 +81,10 @@ public class ProductFileTest extends TestCase {
* Test method for {@link org.eclipse.equinox.internal.p2.publisher.eclipse.ProductFile#getBundles(boolean)}.
*/
public void testGetBundles() {
- List bundles = productFile.getBundles(false);
+ List<IVersionedId> bundles = productFile.getBundles(false);
assertEquals("1.0", 1, bundles.size());
- assertEquals("1.1", "org.eclipse.core.runtime", ((IVersionedId) bundles.get(0)).getId());
- assertEquals("1.2", Version.createOSGi(1, 0, 4), ((IVersionedId) bundles.get(0)).getVersion());
+ assertEquals("1.1", "org.eclipse.core.runtime", bundles.get(0).getId());
+ assertEquals("1.2", Version.createOSGi(1, 0, 4), bundles.get(0).getVersion());
bundles = productFile.getBundles(true);
assertEquals("1.3", 2, bundles.size());
}
@@ -93,8 +93,8 @@ public class ProductFileTest extends TestCase {
* Test method for {@link org.eclipse.equinox.internal.p2.publisher.eclipse.ProductFile#getBundleInfos()}.
*/
public void testGetBundleInfos() {
- List bundleInfos = productFile.getBundleInfos();
- BundleInfo info = (BundleInfo) bundleInfos.iterator().next();
+ List<BundleInfo> bundleInfos = productFile.getBundleInfos();
+ BundleInfo info = bundleInfos.iterator().next();
assertEquals("1.0", 1, bundleInfos.size());
assertEquals("1.1", "org.eclipse.core.runtime", info.getSymbolicName());
assertEquals("1.2", 2, info.getStartLevel());
@@ -105,19 +105,19 @@ public class ProductFileTest extends TestCase {
* Test method for {@link org.eclipse.equinox.internal.p2.publisher.eclipse.ProductFile#getFragments()}.
*/
public void testGetFragments() {
- List fragments = productFile.getFragments();
+ List<IVersionedId> fragments = productFile.getFragments();
assertEquals("1.0", 1, fragments.size());
- assertEquals("1.1", "org.eclipse.swt.win32.win32.x86", ((IVersionedId) fragments.get(0)).getId());
+ assertEquals("1.1", "org.eclipse.swt.win32.win32.x86", fragments.get(0).getId());
}
/**
* Test method for {@link org.eclipse.equinox.internal.p2.publisher.eclipse.ProductFile#getFeatures()}.
*/
public void testGetFeatures() {
- List features = productFile.getFeatures();
+ List<IVersionedId> features = productFile.getFeatures();
assertEquals("1.0", 1, features.size());
- assertEquals("1.1", "org.eclipse.rcp", ((IVersionedId) features.get(0)).getId());
- assertEquals("1.2", Version.create("3.5.0.v20081110-9C9tEvNEla71LZ2jFz-RFB-t"), ((IVersionedId) features.get(0)).getVersion());
+ assertEquals("1.1", "org.eclipse.rcp", features.get(0).getId());
+ assertEquals("1.2", Version.create("3.5.0.v20081110-9C9tEvNEla71LZ2jFz-RFB-t"), features.get(0).getVersion());
}
public void testGetRootFeatures() {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/RootFilesActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/RootFilesActionTest.java
index d576b2e49..6976c180f 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/RootFilesActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/RootFilesActionTest.java
@@ -109,7 +109,7 @@ public class RootFilesActionTest extends ActionTest {
IArtifactKey key = ArtifactKey.parse("binary,sdk.rootfiles.win32.win32.x86,3.4.0.i0305"); //$NON-NLS-1$
assertTrue(artifactRepository.contains(key));
// File [] repoFiles = getRepoFiles();
- Map fileList = getRepoFiles(new HashMap());
+ Map<String, Object[]> fileList = getRepoFiles(new HashMap<>());
ZipInputStream zis = ((TestArtifactRepository) artifactRepository).getZipInputStream(key);
TestData.assertContains(fileList, zis, !(!includeRoot && includeFiles && artifactRepo));
@@ -119,7 +119,7 @@ public class RootFilesActionTest extends ActionTest {
*
* @return a list of relative files to the rootPath.
*/
- private Map getRepoFiles(Map map) {
+ private Map<String, Object[]> getRepoFiles(Map<String, Object[]> map) {
if ((testArg & INCLUDES_FILES) > 0) {
map = addEntry(map, "simpleconfigurator.source.jar"); //$NON-NLS-1$
map = addEntry(map, FILE1);
@@ -162,7 +162,7 @@ public class RootFilesActionTest extends ActionTest {
return result;
}
- private Map addEntry(Map map, String fileEntry) {
+ private Map<String, Object[]> addEntry(Map<String, Object[]> map, String fileEntry) {
try {
ByteArrayOutputStream content = new ByteArrayOutputStream();
File contentBytes = new File(root, fileEntry);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/AbstractSharedBundleProductTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/AbstractSharedBundleProductTest.java
index f1fdd72f3..1cd413b64 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/AbstractSharedBundleProductTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/AbstractSharedBundleProductTest.java
@@ -34,7 +34,7 @@ public class AbstractSharedBundleProductTest extends AbstractReconcilerTest {
}
private Map<String, BundleInfo> getBootstrapBundles() {
- Map<String, BundleInfo> result = new HashMap();
+ Map<String, BundleInfo> result = new HashMap<>();
// TODO deal with fragments
// list.add("org.eclipse.core.net.win32.x86");
@@ -91,7 +91,7 @@ public class AbstractSharedBundleProductTest extends AbstractReconcilerTest {
} catch (IOException e) {
fail("Exception occurred loading bundles.info file from: " + getBundlesInfo().getAbsolutePath(), e);
}
- Map<String, BundleInfo> map = new HashMap();
+ Map<String, BundleInfo> map = new HashMap<>();
for (int i = 0; infos != null && i < infos.length; i++) {
map.put(infos[i].getSymbolicName(), infos[i]);
// always add the launcher bundles. do it here because we don't know what os/ws config we will have
@@ -108,9 +108,6 @@ public class AbstractSharedBundleProductTest extends AbstractReconcilerTest {
return result;
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.tests.reconciler.dropins.AbstractReconcilerTest#initialize()
- */
@Override
public void initialize() throws Exception {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/SimpleConfiguratorUtilsTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/SimpleConfiguratorUtilsTest.java
index 38a7d7d90..3c4ce5c55 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/SimpleConfiguratorUtilsTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/SimpleConfiguratorUtilsTest.java
@@ -158,7 +158,7 @@ public class SimpleConfiguratorUtilsTest extends AbstractProvisioningTest {
File baseFile = getTempFolder();
URI baseURI = baseFile.toURI();
try {
- List infos = SimpleConfiguratorUtils.readConfiguration(data.toURL(), baseURI);
+ List<BundleInfo> infos = SimpleConfiguratorUtils.readConfiguration(data.toURL(), baseURI);
assertEquals("1.1", 2, infos.size());
BundleInfo a = new BundleInfo("a", "1.0.0", new URI("plugins/a_1.0.0.jar"), 4, false);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/testserver/helper/TestServerController.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/testserver/helper/TestServerController.java
index c81f93afa..b62d73d7d 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/testserver/helper/TestServerController.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/testserver/helper/TestServerController.java
@@ -88,7 +88,7 @@ public class TestServerController {
if (!startTransient(pkgAdmin, BUNDLE_TESTSERVER))
throw new IllegalStateException("Unable to start bundle " + BUNDLE_TESTSERVER);
// We must ensure that our IServiceUI service wins because the SDK registers one declaratively
- Hashtable properties = new Hashtable(1);
+ Hashtable<String, Integer> properties = new Hashtable<>(1);
properties.put(org.osgi.framework.Constants.SERVICE_RANKING, Integer.valueOf(Integer.MAX_VALUE));
certificateUIRegistration = context.registerService(UIServices.class.getName(), new DelegatingAuthService(), properties);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddJVMArgumentActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddJVMArgumentActionTest.java
index d43ecff46..df7b50a14 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddJVMArgumentActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddJVMArgumentActionTest.java
@@ -42,8 +42,8 @@ public class AddJVMArgumentActionTest extends AbstractProvisioningTest {
parameters = new HashMap<>();
parameters.put(ActionConstants.PARM_AGENT, getAgent());
EclipseTouchpoint touchpoint = new EclipseTouchpoint();
- Properties profileProperties = new Properties();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, getTempFolder().toString());
+ Map<String, String> profileProperties = new HashMap<>();
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, getTempFolder().toString());
IProfile profile = createProfile("test", profileProperties);
InstallableUnitOperand operand = new InstallableUnitOperand(null, createIU("test"));
touchpoint.initializePhase(null, profile, "test", parameters);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddProgramArgumentActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddProgramArgumentActionTest.java
index 7f9a1e13a..6f7dd39ca 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddProgramArgumentActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddProgramArgumentActionTest.java
@@ -43,8 +43,8 @@ public class AddProgramArgumentActionTest extends AbstractProvisioningTest {
Map<String, Object> parameters = new HashMap<>();
parameters.put(ActionConstants.PARM_AGENT, getAgent());
EclipseTouchpoint touchpoint = new EclipseTouchpoint();
- Properties profileProperties = new Properties();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, getTempFolder().toString());
+ Map<String, String> profileProperties = new HashMap<>();
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, getTempFolder().toString());
IProfile profile = createProfile("test", profileProperties);
InstallableUnitOperand operand = new InstallableUnitOperand(null, createIU("test"));
touchpoint.initializePhase(null, profile, "test", parameters);
@@ -66,10 +66,10 @@ public class AddProgramArgumentActionTest extends AbstractProvisioningTest {
}
public void testExecuteUndoWithArtifact() throws Exception {
- Properties profileProperties = new Properties();
+ Map<String, String> profileProperties = new HashMap<>();
File installFolder = getTempFolder();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
- profileProperties.setProperty(IProfile.PROP_CACHE, installFolder.toString());
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
+ profileProperties.put(IProfile.PROP_CACHE, installFolder.toString());
IProfile profile = createProfile("test", profileProperties);
IFileArtifactRepository bundlePool = Util.getBundlePoolRepository(getAgent(), profile);
@@ -119,10 +119,10 @@ public class AddProgramArgumentActionTest extends AbstractProvisioningTest {
}
public void testExecuteUndoWithArtifactByProgramArgValue() throws Exception {
- Properties profileProperties = new Properties();
+ Map<String, String> profileProperties = new HashMap<>();
File installFolder = getTempFolder();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
- profileProperties.setProperty(IProfile.PROP_CACHE, installFolder.toString());
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
+ profileProperties.put(IProfile.PROP_CACHE, installFolder.toString());
IProfile profile = createProfile("test", profileProperties);
IFileArtifactRepository bundlePool = Util.getBundlePoolRepository(getAgent(), profile);
@@ -178,10 +178,10 @@ public class AddProgramArgumentActionTest extends AbstractProvisioningTest {
}
public void testExecuteUndoWithArtifactLocation() throws Exception {
- Properties profileProperties = new Properties();
+ Map<String, String> profileProperties = new HashMap<>();
File installFolder = getTempFolder();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
- profileProperties.setProperty(IProfile.PROP_CACHE, installFolder.toString());
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
+ profileProperties.put(IProfile.PROP_CACHE, installFolder.toString());
IProfile profile = createProfile("test", profileProperties);
IFileArtifactRepository bundlePool = Util.getBundlePoolRepository(getAgent(), profile);
@@ -231,10 +231,10 @@ public class AddProgramArgumentActionTest extends AbstractProvisioningTest {
}
public void testExecuteUndoWithArtifactLocationByProgramArgValue() throws Exception {
- Properties profileProperties = new Properties();
+ Map<String, String> profileProperties = new HashMap<>();
File installFolder = getTempFolder();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
- profileProperties.setProperty(IProfile.PROP_CACHE, installFolder.toString());
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
+ profileProperties.put(IProfile.PROP_CACHE, installFolder.toString());
IProfile profile = createProfile("test", profileProperties);
IFileArtifactRepository bundlePool = Util.getBundlePoolRepository(getAgent(), profile);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddProgramPropertyActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddProgramPropertyActionTest.java
index 3df900b11..489431619 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddProgramPropertyActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddProgramPropertyActionTest.java
@@ -10,7 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.touchpoint.eclipse;
-import java.util.*;
+import java.util.HashMap;
+import java.util.Map;
import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.ActionConstants;
@@ -35,8 +36,8 @@ public class AddProgramPropertyActionTest extends AbstractProvisioningTest {
Map<String, Object> parameters = new HashMap<>();
parameters.put(ActionConstants.PARM_AGENT, getAgent());
EclipseTouchpoint touchpoint = new EclipseTouchpoint();
- Properties profileProperties = new Properties();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, getTempFolder().toString());
+ Map<String, String> profileProperties = new HashMap<>();
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, getTempFolder().toString());
IProfile profile = createProfile("test", profileProperties);
InstallableUnitOperand operand = new InstallableUnitOperand(null, createIU("test"));
touchpoint.initializePhase(null, profile, "test", parameters);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddRepositoryActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddRepositoryActionTest.java
index 96d078138..c241200a1 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddRepositoryActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddRepositoryActionTest.java
@@ -212,7 +212,7 @@ public class AddRepositoryActionTest extends AbstractProvisioningTest {
//define new IU
version = Version.createOSGi(1, 1, 0);
- Map instructions = new HashMap();
+ Map<String, Object> instructions = new HashMap<>();
instructions.put("configure", TouchpointInstruction.encodeAction("addRepository", getValidArguments()));
ITouchpointData tpData = MetadataFactory.createTouchpointData(instructions);
IInstallableUnit newIU = createIU(id, version, null, NO_REQUIRES, NO_PROVIDES, NO_PROPERTIES, TOUCHPOINT_OSGI, tpData, true, createUpdateDescriptor(id, version), null);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddSourceBundleActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddSourceBundleActionTest.java
index d3e6c6034..e2ada2674 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddSourceBundleActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddSourceBundleActionTest.java
@@ -41,10 +41,10 @@ public class AddSourceBundleActionTest extends AbstractProvisioningTest {
}
public void testExecuteUndo() throws Exception {
- Properties profileProperties = new Properties();
+ Map<String, String> profileProperties = new HashMap<>();
File installFolder = getTempFolder();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
- profileProperties.setProperty(IProfile.PROP_CACHE, installFolder.toString());
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
+ profileProperties.put(IProfile.PROP_CACHE, installFolder.toString());
IProfile profile = createProfile("test", profileProperties);
IFileArtifactRepository bundlePool = Util.getBundlePoolRepository(getAgent(), profile);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/CheckTrustActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/CheckTrustActionTest.java
index 93c9abed9..f4ecf95f5 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/CheckTrustActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/CheckTrustActionTest.java
@@ -40,10 +40,10 @@ public class CheckTrustActionTest extends AbstractProvisioningTest {
}
public void testExecuteUndo() throws Exception {
- Properties profileProperties = new Properties();
+ Map<String, String> profileProperties = new HashMap<>();
File installFolder = getTempFolder();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
- profileProperties.setProperty(IProfile.PROP_CACHE, installFolder.toString());
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
+ profileProperties.put(IProfile.PROP_CACHE, installFolder.toString());
IProfile profile = createProfile("test", profileProperties);
IFileArtifactRepository bundlePool = Util.getBundlePoolRepository(getAgent(), profile);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/ChmodActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/ChmodActionTest.java
index 21176d3ca..126a7a295 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/ChmodActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/ChmodActionTest.java
@@ -41,9 +41,9 @@ public class ChmodActionTest extends AbstractProvisioningTest {
}
public void testExecuteUndo() {
- Properties profileProperties = new Properties();
+ Map<String, String> profileProperties = new HashMap<>();
File installFolder = getTempFolder();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
IProfile profile = createProfile("testExecuteUndo", profileProperties);
File zipSource = getTestData("1.0", "/testData/nativeTouchpoint/a.zip");
@@ -106,10 +106,10 @@ public class ChmodActionTest extends AbstractProvisioningTest {
}
public void testExecuteUndoWithArtifact() throws Exception {
- Properties profileProperties = new Properties();
+ Map<String, String> profileProperties = new HashMap<>();
File installFolder = getTempFolder();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
- profileProperties.setProperty(IProfile.PROP_CACHE, installFolder.toString());
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
+ profileProperties.put(IProfile.PROP_CACHE, installFolder.toString());
IProfile profile = createProfile("test", profileProperties);
IFileArtifactRepository bundlePool = Util.getBundlePoolRepository(getAgent(), profile);
@@ -184,10 +184,10 @@ public class ChmodActionTest extends AbstractProvisioningTest {
}
public void testExecuteUndoWithArtifactLocation() throws Exception {
- Properties profileProperties = new Properties();
+ Map<String, String> profileProperties = new HashMap<>();
File installFolder = getTempFolder();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
- profileProperties.setProperty(IProfile.PROP_CACHE, installFolder.toString());
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
+ profileProperties.put(IProfile.PROP_CACHE, installFolder.toString());
IProfile profile = createProfile("test", profileProperties);
IFileArtifactRepository bundlePool = Util.getBundlePoolRepository(getAgent(), profile);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/CollectActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/CollectActionTest.java
index d6bfdcc46..c74b33fff 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/CollectActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/CollectActionTest.java
@@ -37,10 +37,10 @@ public class CollectActionTest extends AbstractProvisioningTest {
}
public void testExecuteUndo() throws Exception {
- Properties profileProperties = new Properties();
+ Map<String, String> profileProperties = new HashMap<>();
File installFolder = getTempFolder();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
- profileProperties.setProperty(IProfile.PROP_CACHE, installFolder.toString());
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
+ profileProperties.put(IProfile.PROP_CACHE, installFolder.toString());
IProfile profile = createProfile("test", profileProperties);
// still want side-effect
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/EclipseTouchpointTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/EclipseTouchpointTest.java
index 864e170f0..adaaac756 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/EclipseTouchpointTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/EclipseTouchpointTest.java
@@ -91,7 +91,7 @@ public class EclipseTouchpointTest extends AbstractProvisioningTest {
* Tests loading cache extensions from a profile whose install directory contains spaces
*/
public void testBug262073() throws MalformedURLException {
- Map<String, Object> properties = new HashMap<>();
+ Map<String, String> properties = new HashMap<>();
File site = getTestData("Repository", "/testData/artifactRepo/simple with spaces/");
//use URL here so spaces are not encoded
URL spacesLocation = site.toURL();
@@ -116,10 +116,10 @@ public class EclipseTouchpointTest extends AbstractProvisioningTest {
}
public void testPrepareIU() throws Exception {
- Properties profileProperties = new Properties();
+ Map<String, String> profileProperties = new HashMap<>();
File installFolder = getTempFolder();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
- profileProperties.setProperty(IProfile.PROP_CACHE, installFolder.toString());
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
+ profileProperties.put(IProfile.PROP_CACHE, installFolder.toString());
IProfile profile = createProfile("test", profileProperties);
IFileArtifactRepository bundlePool = Util.getBundlePoolRepository(getAgent(), profile);
@@ -154,10 +154,10 @@ public class EclipseTouchpointTest extends AbstractProvisioningTest {
}
public void testInstallPartialIU() throws Exception {
- Properties profileProperties = new Properties();
+ Map<String, String> profileProperties = new HashMap<>();
File installFolder = getTempFolder();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
- profileProperties.setProperty(IProfile.PROP_CACHE, installFolder.toString());
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
+ profileProperties.put(IProfile.PROP_CACHE, installFolder.toString());
IProfile profile = createProfile("test", profileProperties);
IFileArtifactRepository bundlePool = Util.getBundlePoolRepository(getAgent(), profile);
@@ -208,9 +208,9 @@ public class EclipseTouchpointTest extends AbstractProvisioningTest {
public void testInstallPartialIUValidationFailure() throws ProvisionException {
File installFolder = getTempFolder();
- Properties profileProperties = new Properties();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
- profileProperties.setProperty(IProfile.PROP_CACHE, installFolder.toString());
+ Map<String, String> profileProperties = new HashMap<>();
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
+ profileProperties.put(IProfile.PROP_CACHE, installFolder.toString());
IProfile profile = createProfile("test", profileProperties);
URI site = getTestData("0.1", "/testData/updatesite/site").toURI();
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/InstallBundleActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/InstallBundleActionTest.java
index 3e0522c81..c1be533aa 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/InstallBundleActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/InstallBundleActionTest.java
@@ -42,10 +42,10 @@ public class InstallBundleActionTest extends AbstractProvisioningTest {
}
public void testExecuteUndo() throws Exception {
- Properties profileProperties = new Properties();
+ Map<String, String> profileProperties = new HashMap<>();
File installFolder = getTempFolder();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
- profileProperties.setProperty(IProfile.PROP_CACHE, installFolder.toString());
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
+ profileProperties.put(IProfile.PROP_CACHE, installFolder.toString());
IProfile profile = createProfile("test", profileProperties);
IFileArtifactRepository bundlePool = Util.getBundlePoolRepository(getAgent(), profile);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/InstallFeatureActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/InstallFeatureActionTest.java
index 9e43280ea..51666d2ef 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/InstallFeatureActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/InstallFeatureActionTest.java
@@ -41,10 +41,10 @@ public class InstallFeatureActionTest extends AbstractProvisioningTest {
}
public void testExecuteUndo() {
- Properties profileProperties = new Properties();
+ Map<String, String> profileProperties = new HashMap<>();
File installFolder = getTempFolder();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
- profileProperties.setProperty(IProfile.PROP_CACHE, installFolder.toString());
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
+ profileProperties.put(IProfile.PROP_CACHE, installFolder.toString());
IProfile profile = createProfile("test", profileProperties);
IFileArtifactRepository bundlePool = Util.getBundlePoolRepository(getAgent(), profile);
@@ -94,10 +94,10 @@ public class InstallFeatureActionTest extends AbstractProvisioningTest {
}
public void testInstallFolderWithSpaces() {
- Properties profileProperties = new Properties();
+ Map<String, String> profileProperties = new HashMap<>();
File installFolder = new File(getTempFolder(), "with space");
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
- profileProperties.setProperty(IProfile.PROP_CACHE, installFolder.toString());
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
+ profileProperties.put(IProfile.PROP_CACHE, installFolder.toString());
IProfile profile = createProfile("test", profileProperties);
IFileArtifactRepository bundlePool = Util.getBundlePoolRepository(getAgent(), profile);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/JVMArgumentActionLogicTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/JVMArgumentActionLogicTest.java
index 67d57c37e..293dcf759 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/JVMArgumentActionLogicTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/JVMArgumentActionLogicTest.java
@@ -36,8 +36,8 @@ public class JVMArgumentActionLogicTest extends AbstractProvisioningTest {
parameters = new HashMap<>();
parameters.put(ActionConstants.PARM_AGENT, getAgent());
EclipseTouchpoint touchpoint = new EclipseTouchpoint();
- Properties profileProperties = new Properties();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, getTempFolder().toString());
+ Map<String, String> profileProperties = new HashMap<>();
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, getTempFolder().toString());
IProfile profile = createProfile("test", profileProperties);
InstallableUnitOperand operand = new InstallableUnitOperand(null, createIU("test"));
touchpoint.initializePhase(null, profile, "test", parameters);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/LinkActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/LinkActionTest.java
index bb3ce772c..77744b11f 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/LinkActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/LinkActionTest.java
@@ -39,9 +39,9 @@ public class LinkActionTest extends AbstractProvisioningTest {
}
public void testExecuteUndo() {
- Properties profileProperties = new Properties();
+ Map<String, String> profileProperties = new HashMap<>();
File installFolder = getTempFolder();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
IProfile profile = createProfile("test", profileProperties);
File zipSource = getTestData("1.0", "/testData/nativeTouchpoint/a.zip");
@@ -69,10 +69,10 @@ public class LinkActionTest extends AbstractProvisioningTest {
}
public void testExecuteUndoWithArtifact() throws Exception {
- Properties profileProperties = new Properties();
+ Map<String, String> profileProperties = new HashMap<>();
File installFolder = getTempFolder();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
- profileProperties.setProperty(IProfile.PROP_CACHE, installFolder.toString());
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
+ profileProperties.put(IProfile.PROP_CACHE, installFolder.toString());
IProfile profile = createProfile("test", profileProperties);
IFileArtifactRepository bundlePool = Util.getBundlePoolRepository(getAgent(), profile);
@@ -114,10 +114,10 @@ public class LinkActionTest extends AbstractProvisioningTest {
}
public void testExecuteUndoWithArtifactLocation() throws Exception {
- Properties profileProperties = new Properties();
+ Map<String, String> profileProperties = new HashMap<>();
File installFolder = getTempFolder();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
- profileProperties.setProperty(IProfile.PROP_CACHE, installFolder.toString());
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
+ profileProperties.put(IProfile.PROP_CACHE, installFolder.toString());
IProfile profile = createProfile("test", profileProperties);
IFileArtifactRepository bundlePool = Util.getBundlePoolRepository(getAgent(), profile);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/MarkStartedActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/MarkStartedActionTest.java
index f7765760a..de783956a 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/MarkStartedActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/MarkStartedActionTest.java
@@ -42,10 +42,10 @@ public class MarkStartedActionTest extends AbstractProvisioningTest {
}
public void testExecuteUndo() throws Exception {
- Properties profileProperties = new Properties();
+ Map<String, String> profileProperties = new HashMap<>();
File installFolder = getTempFolder();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
- profileProperties.setProperty(IProfile.PROP_CACHE, installFolder.toString());
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
+ profileProperties.put(IProfile.PROP_CACHE, installFolder.toString());
IProfile profile = createProfile("test", profileProperties);
IFileArtifactRepository bundlePool = Util.getBundlePoolRepository(getAgent(), profile);
@@ -88,10 +88,10 @@ public class MarkStartedActionTest extends AbstractProvisioningTest {
}
public void testExecuteUndoWithMissingArtifact() throws Exception {
- Properties profileProperties = new Properties();
+ Map<String, String> profileProperties = new HashMap<>();
File installFolder = getTempFolder();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
- profileProperties.setProperty(IProfile.PROP_CACHE, installFolder.toString());
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
+ profileProperties.put(IProfile.PROP_CACHE, installFolder.toString());
IProfile profile = createProfile("test", profileProperties);
IFileArtifactRepository bundlePool = Util.getBundlePoolRepository(getAgent(), profile);
@@ -137,10 +137,10 @@ public class MarkStartedActionTest extends AbstractProvisioningTest {
}
public void testExecuteOnFragmentBundleResultsInBundleNotBeingMarkedStarted() throws Exception {
- Properties profileProperties = new Properties();
+ Map<String, String> profileProperties = new HashMap<>();
File installFolder = getTempFolder();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
- profileProperties.setProperty(IProfile.PROP_CACHE, installFolder.toString());
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
+ profileProperties.put(IProfile.PROP_CACHE, installFolder.toString());
IProfile profile = createProfile("test", profileProperties);
IFileArtifactRepository bundlePool = Util.getBundlePoolRepository(getAgent(), profile);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveJVMArgumentActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveJVMArgumentActionTest.java
index f08f9954a..af67a0d23 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveJVMArgumentActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveJVMArgumentActionTest.java
@@ -31,8 +31,8 @@ public class RemoveJVMArgumentActionTest extends AbstractProvisioningTest {
Map<String, Object> parameters = new HashMap<>();
parameters.put(ActionConstants.PARM_AGENT, getAgent());
EclipseTouchpoint touchpoint = new EclipseTouchpoint();
- Properties profileProperties = new Properties();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, getTempFolder().toString());
+ Map<String, String> profileProperties = new HashMap<>();
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, getTempFolder().toString());
IProfile profile = createProfile("test", profileProperties);
InstallableUnitOperand operand = new InstallableUnitOperand(null, createIU("test"));
touchpoint.initializePhase(null, profile, "test", parameters);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveProgramArgumentActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveProgramArgumentActionTest.java
index 6c4146e3d..4e8abc449 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveProgramArgumentActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveProgramArgumentActionTest.java
@@ -43,8 +43,8 @@ public class RemoveProgramArgumentActionTest extends AbstractProvisioningTest {
Map<String, Object> parameters = new HashMap<>();
parameters.put(ActionConstants.PARM_AGENT, getAgent());
EclipseTouchpoint touchpoint = new EclipseTouchpoint();
- Properties profileProperties = new Properties();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, getTempFolder().toString());
+ Map<String, String> profileProperties = new HashMap<>();
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, getTempFolder().toString());
IProfile profile = createProfile("test", profileProperties);
InstallableUnitOperand operand = new InstallableUnitOperand(null, createIU("test"));
touchpoint.initializePhase(null, profile, "test", parameters);
@@ -68,10 +68,10 @@ public class RemoveProgramArgumentActionTest extends AbstractProvisioningTest {
}
public void testExecuteUndoWithArtifact() throws Exception {
- Properties profileProperties = new Properties();
+ Map<String, String> profileProperties = new HashMap<>();
File installFolder = getTempFolder();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
- profileProperties.setProperty(IProfile.PROP_CACHE, installFolder.toString());
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
+ profileProperties.put(IProfile.PROP_CACHE, installFolder.toString());
IProfile profile = createProfile("test", profileProperties);
IFileArtifactRepository bundlePool = Util.getBundlePoolRepository(getAgent(), profile);
@@ -124,10 +124,10 @@ public class RemoveProgramArgumentActionTest extends AbstractProvisioningTest {
}
public void testExecuteUndoWithArtifactLocation() throws Exception {
- Properties profileProperties = new Properties();
+ Map<String, String> profileProperties = new HashMap<>();
File installFolder = getTempFolder();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
- profileProperties.setProperty(IProfile.PROP_CACHE, installFolder.toString());
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
+ profileProperties.put(IProfile.PROP_CACHE, installFolder.toString());
IProfile profile = createProfile("test", profileProperties);
IFileArtifactRepository bundlePool = Util.getBundlePoolRepository(getAgent(), profile);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveProgramPropertyActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveProgramPropertyActionTest.java
index 8c76087a8..c73e017a7 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveProgramPropertyActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveProgramPropertyActionTest.java
@@ -10,7 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.touchpoint.eclipse;
-import java.util.*;
+import java.util.HashMap;
+import java.util.Map;
import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.ActionConstants;
@@ -35,8 +36,8 @@ public class RemoveProgramPropertyActionTest extends AbstractProvisioningTest {
Map<String, Object> parameters = new HashMap<>();
parameters.put(ActionConstants.PARM_AGENT, getAgent());
EclipseTouchpoint touchpoint = new EclipseTouchpoint();
- Properties profileProperties = new Properties();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, getTempFolder().toString());
+ Map<String, String> profileProperties = new HashMap<>();
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, getTempFolder().toString());
IProfile profile = createProfile("test", profileProperties);
InstallableUnitOperand operand = new InstallableUnitOperand(null, createIU("test"));
touchpoint.initializePhase(null, profile, "test", parameters);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveRepositoryActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveRepositoryActionTest.java
index 6fe175c9f..13defe036 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveRepositoryActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveRepositoryActionTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -79,7 +79,7 @@ public class RemoveRepositoryActionTest extends AbstractProvisioningTest {
}
public void testNoArguments() {
- IStatus result = action.execute(new HashMap());
+ IStatus result = action.execute(new HashMap<>());
assertTrue("1.0", !result.isOK());
assertTrue("1.1", getArtifactRepositoryManager().isEnabled(locationURI));
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveSourceBundleActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveSourceBundleActionTest.java
index baeeaa11f..d158c3385 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveSourceBundleActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveSourceBundleActionTest.java
@@ -41,10 +41,10 @@ public class RemoveSourceBundleActionTest extends AbstractProvisioningTest {
}
public void testExecuteUndo() throws Exception {
- Properties profileProperties = new Properties();
+ Map<String, String> profileProperties = new HashMap<>();
File installFolder = getTempFolder();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
- profileProperties.setProperty(IProfile.PROP_CACHE, installFolder.toString());
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
+ profileProperties.put(IProfile.PROP_CACHE, installFolder.toString());
IProfile profile = createProfile("test", profileProperties);
IFileArtifactRepository bundlePool = Util.getBundlePoolRepository(getAgent(), profile);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetFrameworkDependentPropertyActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetFrameworkDependentPropertyActionTest.java
index e14f4043e..5132800da 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetFrameworkDependentPropertyActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetFrameworkDependentPropertyActionTest.java
@@ -33,8 +33,8 @@ public class SetFrameworkDependentPropertyActionTest extends AbstractProvisionin
Map<String, Object> parameters = new HashMap<>();
parameters.put(ActionConstants.PARM_AGENT, getAgent());
EclipseTouchpoint touchpoint = new EclipseTouchpoint();
- Properties profileProperties = new Properties();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, getTempFolder().toString());
+ Map<String, String> profileProperties = new HashMap<>();
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, getTempFolder().toString());
IProfile profile = createProfile("test", profileProperties);
InstallableUnitOperand operand = new InstallableUnitOperand(null, createIU("test"));
touchpoint.initializePhase(null, profile, "test", parameters);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetFrameworkIndependentPropertyActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetFrameworkIndependentPropertyActionTest.java
index 3a89a810f..0fc2fea69 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetFrameworkIndependentPropertyActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetFrameworkIndependentPropertyActionTest.java
@@ -33,8 +33,8 @@ public class SetFrameworkIndependentPropertyActionTest extends AbstractProvision
Map<String, Object> parameters = new HashMap<>();
parameters.put(ActionConstants.PARM_AGENT, getAgent());
EclipseTouchpoint touchpoint = new EclipseTouchpoint();
- Properties profileProperties = new Properties();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, getTempFolder().toString());
+ Map<String, String> profileProperties = new HashMap<>();
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, getTempFolder().toString());
IProfile profile = createProfile("test", profileProperties);
InstallableUnitOperand operand = new InstallableUnitOperand(null, createIU("test"));
touchpoint.initializePhase(null, profile, "test", parameters);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetLauncherNameActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetLauncherNameActionTest.java
index 3e0bab566..7823fd9dc 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetLauncherNameActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetLauncherNameActionTest.java
@@ -33,8 +33,8 @@ public class SetLauncherNameActionTest extends AbstractProvisioningTest {
Map<String, Object> parameters = new HashMap<>();
parameters.put(ActionConstants.PARM_AGENT, getAgent());
EclipseTouchpoint touchpoint = new EclipseTouchpoint();
- Properties profileProperties = new Properties();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, getTempFolder().toString());
+ Map<String, String> profileProperties = new HashMap<>();
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, getTempFolder().toString());
IProfile profile = createProfile("test", profileProperties);
InstallableUnitOperand operand = new InstallableUnitOperand(null, createIU("test"));
touchpoint.initializePhase(null, profile, "test", parameters);
@@ -62,7 +62,7 @@ public class SetLauncherNameActionTest extends AbstractProvisioningTest {
EclipseTouchpoint touchpoint = new EclipseTouchpoint();
File tempFolder = getTempFolder();
- Properties profileProperties = new Properties();
+ Map<String, String> profileProperties = new HashMap<>();
profileProperties.put(IProfile.PROP_INSTALL_FOLDER, tempFolder.toString());
profileProperties.put(IProfile.PROP_ENVIRONMENTS, "osgi.ws=cocoa,osgi.os=macosx,osgi.arch=x86");
IProfile profile = createProfile("launcherNameProfile", profileProperties);
@@ -86,7 +86,7 @@ public class SetLauncherNameActionTest extends AbstractProvisioningTest {
public void testChangeName() throws Exception {
File tempFolder = getTempFolder();
- Properties profileProperties = new Properties();
+ Map<String, String> profileProperties = new HashMap<>();
profileProperties.put(IProfile.PROP_INSTALL_FOLDER, tempFolder.toString());
profileProperties.put(IProfile.PROP_ENVIRONMENTS, "osgi.ws=win32,osgi.os=win32,osgi.arch=x86");
IProfile profile = createProfile("changeNameProfile", profileProperties);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetProgramPropertyActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetProgramPropertyActionTest.java
index fbfbdc07e..3a2277aa0 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetProgramPropertyActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetProgramPropertyActionTest.java
@@ -43,8 +43,8 @@ public class SetProgramPropertyActionTest extends AbstractProvisioningTest {
Map<String, Object> parameters = new HashMap<>();
parameters.put(ActionConstants.PARM_AGENT, getAgent());
EclipseTouchpoint touchpoint = new EclipseTouchpoint();
- Properties profileProperties = new Properties();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, getTempFolder().toString());
+ Map<String, String> profileProperties = new HashMap<>();
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, getTempFolder().toString());
IProfile profile = createProfile("test", profileProperties);
InstallableUnitOperand operand = new InstallableUnitOperand(null, createIU("test"));
touchpoint.initializePhase(null, profile, "test", parameters);
@@ -68,10 +68,10 @@ public class SetProgramPropertyActionTest extends AbstractProvisioningTest {
}
public void testExecuteUndoWithArtifact() throws Exception {
- Properties profileProperties = new Properties();
+ Map<String, String> profileProperties = new HashMap<>();
File installFolder = getTempFolder();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
- profileProperties.setProperty(IProfile.PROP_CACHE, installFolder.toString());
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
+ profileProperties.put(IProfile.PROP_CACHE, installFolder.toString());
IProfile profile = createProfile("test", profileProperties);
IFileArtifactRepository bundlePool = Util.getBundlePoolRepository(getAgent(), profile);
@@ -125,10 +125,10 @@ public class SetProgramPropertyActionTest extends AbstractProvisioningTest {
}
public void testExecuteUndoWithArtifactLocation() throws Exception {
- Properties profileProperties = new Properties();
+ Map<String, String> profileProperties = new HashMap<>();
File installFolder = getTempFolder();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
- profileProperties.setProperty(IProfile.PROP_CACHE, installFolder.toString());
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
+ profileProperties.put(IProfile.PROP_CACHE, installFolder.toString());
IProfile profile = createProfile("test", profileProperties);
IFileArtifactRepository bundlePool = Util.getBundlePoolRepository(getAgent(), profile);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetStartLevelActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetStartLevelActionTest.java
index 91256a537..fdcec7a71 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetStartLevelActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetStartLevelActionTest.java
@@ -42,10 +42,10 @@ public class SetStartLevelActionTest extends AbstractProvisioningTest {
}
public void testExecuteUndo() throws Exception {
- Properties profileProperties = new Properties();
+ Map<String, String> profileProperties = new HashMap<>();
File installFolder = getTempFolder();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
- profileProperties.setProperty(IProfile.PROP_CACHE, installFolder.toString());
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
+ profileProperties.put(IProfile.PROP_CACHE, installFolder.toString());
IProfile profile = createProfile("test", profileProperties);
IFileArtifactRepository bundlePool = Util.getBundlePoolRepository(getAgent(), profile);
@@ -88,10 +88,10 @@ public class SetStartLevelActionTest extends AbstractProvisioningTest {
}
public void testExecuteUndoWithMissingArtifact() throws Exception {
- Properties profileProperties = new Properties();
+ Map<String, String> profileProperties = new HashMap<>();
File installFolder = getTempFolder();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
- profileProperties.setProperty(IProfile.PROP_CACHE, installFolder.toString());
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
+ profileProperties.put(IProfile.PROP_CACHE, installFolder.toString());
IProfile profile = createProfile("test", profileProperties);
IFileArtifactRepository bundlePool = Util.getBundlePoolRepository(getAgent(), profile);
@@ -137,10 +137,10 @@ public class SetStartLevelActionTest extends AbstractProvisioningTest {
}
public void testExecuteOnFragmentBundleResultsInBundleNotBeingMarkedStarted() throws Exception {
- Properties profileProperties = new Properties();
+ Map<String, String> profileProperties = new HashMap<>();
File installFolder = getTempFolder();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
- profileProperties.setProperty(IProfile.PROP_CACHE, installFolder.toString());
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
+ profileProperties.put(IProfile.PROP_CACHE, installFolder.toString());
IProfile profile = createProfile("test", profileProperties);
IFileArtifactRepository bundlePool = Util.getBundlePoolRepository(getAgent(), profile);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/UninstallBundleActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/UninstallBundleActionTest.java
index 6f591f12b..8d3853ff2 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/UninstallBundleActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/UninstallBundleActionTest.java
@@ -42,10 +42,10 @@ public class UninstallBundleActionTest extends AbstractProvisioningTest {
}
public void testExecuteUndo() throws Exception {
- Properties profileProperties = new Properties();
+ Map<String, String> profileProperties = new HashMap<>();
File installFolder = getTempFolder();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
- profileProperties.setProperty(IProfile.PROP_CACHE, installFolder.toString());
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
+ profileProperties.put(IProfile.PROP_CACHE, installFolder.toString());
IProfile profile = createProfile("test", profileProperties);
IFileArtifactRepository bundlePool = Util.getBundlePoolRepository(getAgent(), profile);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/UninstallFeatureActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/UninstallFeatureActionTest.java
index fe2bf8f40..908d1eab5 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/UninstallFeatureActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/UninstallFeatureActionTest.java
@@ -45,10 +45,10 @@ public class UninstallFeatureActionTest extends AbstractProvisioningTest {
}
public void testExecuteUndo() {
- Properties profileProperties = new Properties();
+ Map<String, String> profileProperties = new HashMap<>();
File installFolder = getTempFolder();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
- profileProperties.setProperty(IProfile.PROP_CACHE, installFolder.toString());
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
+ profileProperties.put(IProfile.PROP_CACHE, installFolder.toString());
IProfile profile = createProfile("test", profileProperties);
IFileArtifactRepository bundlePool = Util.getBundlePoolRepository(getAgent(), profile);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/UtilTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/UtilTest.java
index 048f08647..806e7213d 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/UtilTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/UtilTest.java
@@ -1,10 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2008, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
+ * Copyright (c) 2008, 2017 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* Ericsson AB (Pascal Rapicault) - Support to reuse bundles in place
@@ -13,7 +13,8 @@ package org.eclipse.equinox.p2.tests.touchpoint.eclipse;
import java.io.File;
import java.net.MalformedURLException;
-import java.util.Properties;
+import java.util.HashMap;
+import java.util.Map;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.eclipse.core.runtime.NullProgressMonitor;
@@ -50,7 +51,7 @@ public class UtilTest extends AbstractProvisioningTest {
}
public void testExplicitBundlePool() throws MalformedURLException {
- Properties props = new Properties();
+ Map<String, String> props = new HashMap<>();
File cacheDir = new File(System.getProperty("java.io.tmpdir"), "cache");
props.put(IProfile.PROP_CACHE, cacheDir.toString());
IProfile profile = createProfile("test", props);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/CheckAndPromptNativePackageWindowsRegistryTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/CheckAndPromptNativePackageWindowsRegistryTest.java
index de5e77e6a..381939940 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/CheckAndPromptNativePackageWindowsRegistryTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/CheckAndPromptNativePackageWindowsRegistryTest.java
@@ -178,9 +178,9 @@ public class CheckAndPromptNativePackageWindowsRegistryTest {
}
private NativeTouchpoint createTouchpoint(Map<String, Object> parameters) {
- Properties profileProperties = new Properties();
+ Map<String, String> profileProperties = new HashMap<>();
File installFolder = testHelper.getTempFolder();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
IProfile profile = testHelper.createProfile("test", profileProperties);
parameters.put(ActionConstants.PARM_PROFILE, profile);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/ChmodActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/ChmodActionTest.java
index f6c3b85f7..c148b979e 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/ChmodActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/ChmodActionTest.java
@@ -31,9 +31,9 @@ public class ChmodActionTest extends AbstractProvisioningTest {
}
public void testExecuteUndo() {
- Properties profileProperties = new Properties();
+ Map<String, String> profileProperties = new HashMap<>();
File installFolder = getTempFolder();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
IProfile profile = createProfile("testExecuteUndo", profileProperties);
File zipSource = getTestData("1.0", "/testData/nativeTouchpoint/a.zip");
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/CleanupzipActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/CleanupzipActionTest.java
index 3ed153312..b1fe8d22a 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/CleanupzipActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/CleanupzipActionTest.java
@@ -41,9 +41,9 @@ public class CleanupzipActionTest extends AbstractProvisioningTest {
}
public void testExecuteUndo() {
- Properties profileProperties = new Properties();
+ Map<String, String> profileProperties = new HashMap<>();
File installFolder = getTempFolder();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
IProfile profile = createProfile("testExecuteUndo", profileProperties);
File zipSource = getTestData("1.0", "/testData/nativeTouchpoint/a.zip");
@@ -86,9 +86,9 @@ public class CleanupzipActionTest extends AbstractProvisioningTest {
}
public void testExecuteUndoWhereInstallFolderIsDifferent() {
- Properties profileProperties = new Properties();
+ Map<String, String> profileProperties = new HashMap<>();
File installFolder = getTempFolder();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
IProfile profile = createProfile("testExecuteUndoWhereInstallFolderIsDifferent", profileProperties);
File zipSource = getTestData("1.0", "/testData/nativeTouchpoint/a.zip");
@@ -139,9 +139,9 @@ public class CleanupzipActionTest extends AbstractProvisioningTest {
* Test that directories are removed when nested zip is unzipped.
*/
public void testDirectoryCleanup() {
- Properties profileProperties = new Properties();
+ Map<String, String> profileProperties = new HashMap<>();
File installFolder = getTempFolder();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
IProfile profile = createProfile("testExecuteUndo", profileProperties);
File zipSource = getTestData("1.0", "/testData/nativeTouchpoint/nestedFolder.zip");
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/CollectActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/CollectActionTest.java
index 3e1fba462..b966063db 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/CollectActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/CollectActionTest.java
@@ -34,9 +34,9 @@ public class CollectActionTest extends AbstractProvisioningTest {
}
public void testExecuteUndo() {
- Properties profileProperties = new Properties();
+ Map<String, String> profileProperties = new HashMap<>();
File installFolder = getTempFolder();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
IProfile profile = createProfile("test", profileProperties);
// File zipSource = getTestData("1.0", "/testData/nativeTouchpoint/a.zip");
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/CopyActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/CopyActionTest.java
index 37e24f2ce..96df75675 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/CopyActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/CopyActionTest.java
@@ -200,9 +200,9 @@ public class CopyActionTest extends AbstractProvisioningTest {
* - copy of directory with overwrite false/true
*/
private Map<String, Object> createParameters(String sourceName, String targetName, boolean overwrite) {
- Properties profileProperties = new Properties();
+ Map<String, String> profileProperties = new HashMap<>();
File installFolder = getTempFolder();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
IProfile profile = createProfile("test", profileProperties);
File source = getTestData("1.0", sourceName);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/LinkActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/LinkActionTest.java
index 8f9278c1c..27c87947f 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/LinkActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/LinkActionTest.java
@@ -29,9 +29,9 @@ public class LinkActionTest extends AbstractProvisioningTest {
}
public void testExecuteUndo() {
- Properties profileProperties = new Properties();
+ Map<String, String> profileProperties = new HashMap<>();
File installFolder = getTempFolder();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
IProfile profile = createProfile("test", profileProperties);
File zipSource = getTestData("1.0", "/testData/nativeTouchpoint/a.zip");
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/MkdirActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/MkdirActionTest.java
index 0a0003a3f..673d270d5 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/MkdirActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/MkdirActionTest.java
@@ -27,9 +27,9 @@ public class MkdirActionTest extends AbstractProvisioningTest {
}
public void testExecuteUndo() {
- Properties profileProperties = new Properties();
+ Map<String, String> profileProperties = new HashMap<>();
File installFolder = getTempFolder();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
IProfile profile = createProfile("test", profileProperties);
Map<String, Object> parameters = new HashMap<>();
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/NativeTouchpointTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/NativeTouchpointTest.java
index 3b98380d0..49b1d61d7 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/NativeTouchpointTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/NativeTouchpointTest.java
@@ -1,17 +1,18 @@
/*******************************************************************************
- * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * Copyright (c) 2008, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.equinox.p2.tests.touchpoint.natives;
import java.io.File;
-import java.util.*;
+import java.util.HashMap;
+import java.util.Map;
import org.eclipse.equinox.internal.p2.touchpoint.natives.NativeTouchpoint;
import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
@@ -29,16 +30,16 @@ public class NativeTouchpointTest extends AbstractProvisioningTest {
public void testInitializeCompletePhase() {
NativeTouchpoint touchpoint = new NativeTouchpoint();
- Map parameters = new HashMap();
+ Map<String, Object> parameters = new HashMap<>();
IProfile profile = createProfile("test");
touchpoint.initializePhase(null, profile, "test", parameters);
touchpoint.completePhase(null, profile, "test", parameters);
parameters.clear();
- Properties profileProperties = new Properties();
+ Map<String, String> profileProperties = new HashMap<>();
File installFolder = getTempFolder();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
profile = createProfile("test", profileProperties);
touchpoint.initializePhase(null, profile, "test", parameters);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/RemoveActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/RemoveActionTest.java
index 5ece8bef1..236083ae4 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/RemoveActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/RemoveActionTest.java
@@ -50,9 +50,9 @@ public class RemoveActionTest extends AbstractProvisioningTest {
protected void setUp() throws Exception {
super.setUp();
- Properties profileProperties = new Properties();
+ Map<String, String> profileProperties = new HashMap<>();
File installFolder = getTempFolder();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
IProfile profile = createProfile("testExecuteUndo", profileProperties);
parameters = new HashMap<>();
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/RmdirActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/RmdirActionTest.java
index 9e11edc7f..8e01e977f 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/RmdirActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/RmdirActionTest.java
@@ -31,9 +31,9 @@ public class RmdirActionTest extends AbstractProvisioningTest {
}
public void testExecuteUndo() {
- Properties profileProperties = new Properties();
+ Map<String, String> profileProperties = new HashMap<>();
File installFolder = getTempFolder();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
IProfile profile = createProfile("testExecuteUndo", profileProperties);
Map<String, Object> parameters = new HashMap<>();
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/UnzipActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/UnzipActionTest.java
index 755c1c1b3..3a40cc672 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/UnzipActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/UnzipActionTest.java
@@ -39,9 +39,9 @@ public class UnzipActionTest extends AbstractProvisioningTest {
}
public void testExecuteUndo() {
- Properties profileProperties = new Properties();
+ Map<String, String> profileProperties = new HashMap<>();
File installFolder = getTempFolder();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
IProfile profile = createProfile("test", profileProperties);
File zipSource = getTestData("1.0", "/testData/nativeTouchpoint/a.zip");
@@ -79,9 +79,9 @@ public class UnzipActionTest extends AbstractProvisioningTest {
}
public void testExecuteUndoBackup() {
- Properties profileProperties = new Properties();
+ Map<String, String> profileProperties = new HashMap<>();
File installFolder = getTempFolder();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
IProfile profile = createProfile("testExecuteUndoBackup", profileProperties);
File zipSource = getTestData("1.0", "/testData/nativeTouchpoint/a.zip");
@@ -137,9 +137,9 @@ public class UnzipActionTest extends AbstractProvisioningTest {
* id contains characters that are not valid in file names. See bug 274182.
*/
public void testUndoBackUpWithSymbolsInProfileId() {
- Properties profileProperties = new Properties();
+ Map<String, String> profileProperties = new HashMap<>();
File installFolder = getTempFolder();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
final String profileId = "Test:With\\Sym/bols";
IProfile profile = createProfile(profileId, profileProperties);
@@ -304,8 +304,8 @@ public class UnzipActionTest extends AbstractProvisioningTest {
assertFalse("File " + file.getPath() + " should not exist", file.exists());
}
- Properties profileProperties = new Properties();
- profileProperties.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
+ Map<String, String> profileProperties = new HashMap<>();
+ profileProperties.put(IProfile.PROP_INSTALL_FOLDER, installFolder.toString());
IProfile profile = createProfile("test", profileProperties);
File zipSource = getTestData("1.0", "/testData/nativeTouchpoint/a.dir.zip");

Back to the top