Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2013-11-15 01:39:49 -0500
committerAlexander Kurtakov2013-11-15 01:40:43 -0500
commitc2ffd5860b51fc5ca6b19bf4b4bdb879c1d297fa (patch)
tree861e3f9e21069fc19f843295f7703ebc42458aa2 /bundles/org.eclipse.equinox.p2.tests.ui
parent10d37f35fc48d728419738510c54d3a4a78abf2e (diff)
downloadrt.equinox.p2-c2ffd5860b51fc5ca6b19bf4b4bdb879c1d297fa.tar.gz
rt.equinox.p2-c2ffd5860b51fc5ca6b19bf4b4bdb879c1d297fa.tar.xz
rt.equinox.p2-c2ffd5860b51fc5ca6b19bf4b4bdb879c1d297fa.zip
Bug 421798 - Fix various warnings.
* Remove unneeded casts. * Remove unneeded throws. * Remove unneeded semicolons. Change-Id: I7454ea216cfc194a0d394550feecc29042d23363 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.tests.ui')
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/UninstallOperationTests.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/UpdateOperationTests.java17
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryProviderTests.java5
3 files changed, 11 insertions, 15 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/UninstallOperationTests.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/UninstallOperationTests.java
index 76b3f403c..a405e5d90 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/UninstallOperationTests.java
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/UninstallOperationTests.java
@@ -11,9 +11,7 @@
package org.eclipse.equinox.p2.tests.ui.operations;
import java.net.URI;
-import java.net.URISyntaxException;
import java.util.HashSet;
-import org.eclipse.equinox.p2.core.ProvisionException;
import org.eclipse.equinox.p2.engine.ProvisioningContext;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.metadata.expression.ExpressionUtil;
@@ -27,7 +25,7 @@ import org.eclipse.equinox.p2.tests.ui.AbstractProvisioningUITest;
* using the operation API.
*/
public class UninstallOperationTests extends AbstractProvisioningUITest {
- public void testUninstallContactsNoRepositories() throws ProvisionException, URISyntaxException {
+ public void testUninstallContactsNoRepositories() {
HashSet<IInstallableUnit> ius = new HashSet<IInstallableUnit>();
ius.add(top1);
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/UpdateOperationTests.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/UpdateOperationTests.java
index 53373f2e8..cb00d3216 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/UpdateOperationTests.java
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/UpdateOperationTests.java
@@ -13,7 +13,6 @@ package org.eclipse.equinox.p2.tests.ui.operations;
import java.util.ArrayList;
import java.util.HashSet;
import org.eclipse.equinox.internal.p2.operations.SearchForUpdatesResolutionJob;
-import org.eclipse.equinox.p2.core.ProvisionException;
import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.operations.*;
import org.eclipse.equinox.p2.planner.IProfileChangeRequest;
@@ -51,7 +50,7 @@ public class UpdateOperationTests extends AbstractProvisioningUITest {
getPolicy().setShowLatestVersionsOnly(false);
}
- public void testChooseUpdateOverPatch() throws ProvisionException {
+ public void testChooseUpdateOverPatch() {
createTestMetdataRepository(new IInstallableUnit[] {a1, a120WithDifferentId, a130, firstPatchForA1, patchFora2});
install(a1, true, false);
ArrayList<IInstallableUnit> iusInvolved = new ArrayList<IInstallableUnit>();
@@ -65,7 +64,7 @@ public class UpdateOperationTests extends AbstractProvisioningUITest {
assertTrue("1.3", request.getRemovals().iterator().next().equals(a1));
}
- public void testForcePatchOverUpdate() throws ProvisionException {
+ public void testForcePatchOverUpdate() {
createTestMetdataRepository(new IInstallableUnit[] {a1, a120WithDifferentId, a130, firstPatchForA1, patchFora2});
install(a1, true, false);
ArrayList<IInstallableUnit> iusInvolved = new ArrayList<IInstallableUnit>();
@@ -89,7 +88,7 @@ public class UpdateOperationTests extends AbstractProvisioningUITest {
assertTrue("1.2", request.getRemovals().size() == 0);
}
- public void testRecognizePatchIsInstalled() throws ProvisionException {
+ public void testRecognizePatchIsInstalled() {
createTestMetdataRepository(new IInstallableUnit[] {a1, a120WithDifferentId, a130, firstPatchForA1, patchFora2});
install(a1, true, false);
install(firstPatchForA1, true, false);
@@ -106,7 +105,7 @@ public class UpdateOperationTests extends AbstractProvisioningUITest {
assertEquals("1.2", 2, op.getPossibleUpdates().length);
}
- public void testChooseNotTheNewest() throws ProvisionException {
+ public void testChooseNotTheNewest() {
createTestMetdataRepository(new IInstallableUnit[] {a1, a120WithDifferentId, a130, firstPatchForA1, patchFora2});
install(a1, true, false);
ArrayList<IInstallableUnit> iusInvolved = new ArrayList<IInstallableUnit>();
@@ -132,7 +131,7 @@ public class UpdateOperationTests extends AbstractProvisioningUITest {
assertEquals("1.2", 3, op.getPossibleUpdates().length);
}
- public void testChooseLatestPatches() throws ProvisionException {
+ public void testChooseLatestPatches() {
createTestMetdataRepository(new IInstallableUnit[] {a1, firstPatchForA1, secondPatchForA1, thirdPatchForA1});
install(a1, true, false);
ArrayList<IInstallableUnit> iusInvolved = new ArrayList<IInstallableUnit>();
@@ -150,7 +149,7 @@ public class UpdateOperationTests extends AbstractProvisioningUITest {
assertEquals("1.2", 3, op.getPossibleUpdates().length);
}
- public void testLatestHasDifferentId() throws ProvisionException {
+ public void testLatestHasDifferentId() {
createTestMetdataRepository(new IInstallableUnit[] {a1, firstPatchForA1, secondPatchForA1, thirdPatchForA1, a120WithDifferentId, a130, a140WithDifferentId});
install(a1, true, false);
ArrayList<IInstallableUnit> iusInvolved = new ArrayList<IInstallableUnit>();
@@ -166,7 +165,7 @@ public class UpdateOperationTests extends AbstractProvisioningUITest {
}
// bug 300445
- public void testRemoveSelectionAfterResolve() throws ProvisionException {
+ public void testRemoveSelectionAfterResolve() {
createTestMetdataRepository(new IInstallableUnit[] {a1, a130, b1, b12});
install(a1, true, false);
ArrayList<IInstallableUnit> iusInvolved = new ArrayList<IInstallableUnit>();
@@ -183,7 +182,7 @@ public class UpdateOperationTests extends AbstractProvisioningUITest {
}
// bug 290858
- public void testSearchForUpdatesInJob() throws ProvisionException {
+ public void testSearchForUpdatesInJob() {
createTestMetdataRepository(new IInstallableUnit[] {a1, a130, b1, b12});
install(a1, true, false);
ArrayList<IInstallableUnit> iusInvolved = new ArrayList<IInstallableUnit>();
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryProviderTests.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryProviderTests.java
index b13e7e734..5a5556e1e 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryProviderTests.java
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryProviderTests.java
@@ -13,7 +13,6 @@ package org.eclipse.equinox.p2.tests.ui.query;
import java.util.ArrayList;
import java.util.HashMap;
import org.eclipse.equinox.internal.p2.ui.model.*;
-import org.eclipse.equinox.p2.core.ProvisionException;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.metadata.Version;
import org.eclipse.equinox.p2.operations.InstallOperation;
@@ -45,7 +44,7 @@ public class QueryProviderTests extends AbstractProvisioningUITest {
testRepo = createTestMetdataRepository(new IInstallableUnit[] {category, nestedCategory, a, b, c});
}
- public void testNestedCategories() throws ProvisionException {
+ public void testNestedCategories() {
MetadataRepositoryElement element = new MetadataRepositoryElement(null, testRepo.getLocation(), true);
Object[] children = element.getChildren(element);
assertEquals("1.1", 1, children.length); // the nested category should get removed from the list
@@ -64,7 +63,7 @@ public class QueryProviderTests extends AbstractProvisioningUITest {
assertTrue("1.3", foundNestedCategory);
}
- public void testInstallDrilldown() throws ProvisionException {
+ public void testInstallDrilldown() {
IUElementListRoot root = new IUElementListRoot();
AvailableIUElement element = new AvailableIUElement(root, a, TESTPROFILE, getPolicy().getShowDrilldownRequirements());
root.setChildren(new Object[] {element});

Back to the top