summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2013-11-15 01:39:49 (EST)
committerAlexander Kurtakov2013-11-15 01:40:43 (EST)
commitc2ffd5860b51fc5ca6b19bf4b4bdb879c1d297fa (patch)
tree861e3f9e21069fc19f843295f7703ebc42458aa2
parent10d37f35fc48d728419738510c54d3a4a78abf2e (diff)
downloadrt.equinox.p2-c2ffd5860b51fc5ca6b19bf4b4bdb879c1d297fa.zip
rt.equinox.p2-c2ffd5860b51fc5ca6b19bf4b4bdb879c1d297fa.tar.gz
rt.equinox.p2-c2ffd5860b51fc5ca6b19bf4b4bdb879c1d297fa.tar.bz2
Bug 421798 - Fix various warnings.refs/changes/18/18418/1
* Remove unneeded casts. * Remove unneeded throws. * Remove unneeded semicolons. Change-Id: I7454ea216cfc194a0d394550feecc29042d23363 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxManipulatorImpl.java4
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/MacOSLikeSetup.java3
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest1.java3
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest2.java3
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest3.java3
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest4.java3
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest5.java3
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTestBug267850.java3
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTestBug285935.java3
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestRunningInstance.java2
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/frameworkadmin/BundleInfo.java3
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/SimpleBundlesState.java2
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/ConfigData.java1
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/FrameworkAdminRuntimeException.java3
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/LauncherData.java1
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processing/AbstractBufferingStep.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TranslationSupport.java2
-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
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/TestArtifactRepository.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/ArtifactOutputStreamTest.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/Bug351944.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/CorruptedJar.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/JarURLArtifactRepositoryTest.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/processing/ProcessingStepTest.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/ProfileRegistryTest.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/ProfileTest.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/MetadataRepositoryManagerTest.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug252682.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/NonMinimalState2.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/repository/FileReaderTest.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/sharedinstall/AbstractSharedInstallTest.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddRepositoryActionTest.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/EclipseTouchpointTest.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/operations/DiscoveryInstallOperation.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ImportWizard.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstallWizard.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/UpdateSite.java2
39 files changed, 56 insertions, 67 deletions
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxManipulatorImpl.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxManipulatorImpl.java
index 6c92723..57916d3 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxManipulatorImpl.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxManipulatorImpl.java
@@ -285,9 +285,9 @@ public class EquinoxManipulatorImpl implements Manipulator {
// System.out.println("bundles[" + i + "]=" + bundles[i]);
try {
if (bundles[i].getBundleId() == 0) // SystemBundle
- bInfos[i] = new BundleInfo(bundles[i].getSymbolicName(), (String) bundles[i].getHeaders("").get(Constants.BUNDLE_VERSION), FileLocator.getBundleFile(bundles[i]).getAbsoluteFile().toURI(), -1, true); //$NON-NLS-1$
+ bInfos[i] = new BundleInfo(bundles[i].getSymbolicName(), bundles[i].getHeaders("").get(Constants.BUNDLE_VERSION), FileLocator.getBundleFile(bundles[i]).getAbsoluteFile().toURI(), -1, true); //$NON-NLS-1$
else {
- bInfos[i] = new BundleInfo(bundles[i].getSymbolicName(), (String) bundles[i].getHeaders("").get(Constants.BUNDLE_VERSION), FileLocator.getBundleFile(bundles[i]).getAbsoluteFile().toURI(), startLevel.getBundleStartLevel(bundles[i]), startLevel.isBundlePersistentlyStarted(bundles[i])); //$NON-NLS-1$
+ bInfos[i] = new BundleInfo(bundles[i].getSymbolicName(), bundles[i].getHeaders("").get(Constants.BUNDLE_VERSION), FileLocator.getBundleFile(bundles[i]).getAbsoluteFile().toURI(), startLevel.getBundleStartLevel(bundles[i]), startLevel.isBundlePersistentlyStarted(bundles[i])); //$NON-NLS-1$
}
} catch (IOException e) {
e.printStackTrace();
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/MacOSLikeSetup.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/MacOSLikeSetup.java
index cd62c95..80acaa7 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/MacOSLikeSetup.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/MacOSLikeSetup.java
@@ -10,7 +10,6 @@ package org.eclipse.equinox.frameworkadmin.tests;
import java.io.File;
import java.io.IOException;
-import java.net.URISyntaxException;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.equinox.frameworkadmin.BundleInfo;
import org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxConstants;
@@ -24,7 +23,7 @@ public class MacOSLikeSetup extends FwkAdminAndSimpleConfiguratorTest {
super(name);
}
- public void testMacOSSetup() throws FrameworkAdminRuntimeException, IOException, BundleException, URISyntaxException {
+ public void testMacOSSetup() throws FrameworkAdminRuntimeException, IOException, BundleException {
FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
Manipulator manipulator = fwkAdmin.getManipulator();
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest1.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest1.java
index 8faafbb..2d71d9c 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest1.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest1.java
@@ -12,7 +12,6 @@ package org.eclipse.equinox.frameworkadmin.tests;
import java.io.File;
import java.io.IOException;
-import java.net.URISyntaxException;
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
import org.osgi.framework.BundleException;
@@ -25,7 +24,7 @@ public class ReaderTest1 extends AbstractFwkAdminTest {
}
- public void testConfigContent() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException, URISyntaxException {
+ public void testConfigContent() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException {
startSimpleConfiguratorManipulator();
FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest2.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest2.java
index 2f797aa..0fad940 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest2.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest2.java
@@ -12,7 +12,6 @@ package org.eclipse.equinox.frameworkadmin.tests;
import java.io.File;
import java.io.IOException;
-import java.net.URISyntaxException;
import java.util.Properties;
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
import org.osgi.framework.BundleException;
@@ -38,7 +37,7 @@ public class ReaderTest2 extends AbstractFwkAdminTest {
writeConfigIni(new File(configurationFolder, "config.ini"), properties);
}
- public void testConfigContent() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException, URISyntaxException {
+ public void testConfigContent() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException {
FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
Manipulator manipulator = fwkAdmin.getManipulator();
LauncherData launcherData = manipulator.getLauncherData();
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest3.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest3.java
index e740eda..46498ce 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest3.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest3.java
@@ -12,7 +12,6 @@ package org.eclipse.equinox.frameworkadmin.tests;
import java.io.File;
import java.io.IOException;
-import java.net.URISyntaxException;
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
import org.osgi.framework.BundleException;
@@ -25,7 +24,7 @@ public class ReaderTest3 extends AbstractFwkAdminTest {
}
- public void testConfigContent() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException, URISyntaxException {
+ public void testConfigContent() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException {
startSimpleConfiguratorManipulator();
FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest4.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest4.java
index 0406b93..34b972e 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest4.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest4.java
@@ -12,7 +12,6 @@ package org.eclipse.equinox.frameworkadmin.tests;
import java.io.File;
import java.io.IOException;
-import java.net.URISyntaxException;
import java.util.Properties;
import org.eclipse.core.runtime.URIUtil;
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
@@ -39,7 +38,7 @@ public class ReaderTest4 extends AbstractFwkAdminTest {
writeConfigIni(new File(configurationFolder, "config.ini"), properties);
}
- public void testConfigContent() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException, URISyntaxException {
+ public void testConfigContent() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException {
FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
Manipulator manipulator = fwkAdmin.getManipulator();
LauncherData launcherData = manipulator.getLauncherData();
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest5.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest5.java
index 70f34af..39460a9 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest5.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest5.java
@@ -12,7 +12,6 @@ package org.eclipse.equinox.frameworkadmin.tests;
import java.io.File;
import java.io.IOException;
-import java.net.URISyntaxException;
import java.util.Properties;
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
import org.osgi.framework.BundleException;
@@ -38,7 +37,7 @@ public class ReaderTest5 extends AbstractFwkAdminTest {
writeConfigIni(new File(configurationFolder, "config.ini"), properties);
}
- public void testConfigContent() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException, URISyntaxException {
+ public void testConfigContent() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException {
FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
Manipulator manipulator = fwkAdmin.getManipulator();
LauncherData launcherData = manipulator.getLauncherData();
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTestBug267850.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTestBug267850.java
index 1169ebb..cffe5de 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTestBug267850.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTestBug267850.java
@@ -12,7 +12,6 @@ package org.eclipse.equinox.frameworkadmin.tests;
import java.io.File;
import java.io.IOException;
-import java.net.URISyntaxException;
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
import org.osgi.framework.BundleException;
@@ -25,7 +24,7 @@ public class ReaderTestBug267850 extends AbstractFwkAdminTest {
}
- public void testConfigContent() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException, URISyntaxException {
+ public void testConfigContent() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException {
startSimpleConfiguratorManipulator();
FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTestBug285935.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTestBug285935.java
index 00d92db..df0bc6f 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTestBug285935.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTestBug285935.java
@@ -12,7 +12,6 @@ package org.eclipse.equinox.frameworkadmin.tests;
import java.io.File;
import java.io.IOException;
-import java.net.URISyntaxException;
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
import org.osgi.framework.BundleException;
@@ -25,7 +24,7 @@ public class ReaderTestBug285935 extends AbstractFwkAdminTest {
}
- public void testConfigContent() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException, URISyntaxException {
+ public void testConfigContent() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException {
startSimpleConfiguratorManipulator();
FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestRunningInstance.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestRunningInstance.java
index 5cc7a4c..0c1844f 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestRunningInstance.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestRunningInstance.java
@@ -46,7 +46,7 @@ public class TestRunningInstance extends AbstractFwkAdminTest {
private boolean same(BundleInfo info, Bundle bundle) {
if (info.getSymbolicName().equals(bundle.getSymbolicName())) {
- if (new Version((String) bundle.getHeaders().get(Constants.BUNDLE_VERSION)).equals(new Version(info.getVersion())))
+ if (new Version(bundle.getHeaders().get(Constants.BUNDLE_VERSION)).equals(new Version(info.getVersion())))
return true;
}
return false;
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/frameworkadmin/BundleInfo.java b/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/frameworkadmin/BundleInfo.java
index 702fd18..0b439d8 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/frameworkadmin/BundleInfo.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/frameworkadmin/BundleInfo.java
@@ -251,6 +251,7 @@ public class BundleInfo {
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
+ @Override
public String toString() {
StringBuffer buffer = new StringBuffer();
buffer.append("BundleInfo("); //$NON-NLS-1$
@@ -283,6 +284,7 @@ public class BundleInfo {
return buffer.toString();
}
+ @Override
public int hashCode() {
final int prime = 31;
int result = 1;
@@ -291,6 +293,7 @@ public class BundleInfo {
return result;
}
+ @Override
public boolean equals(Object obj) {
if (this == obj)
return true;
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/SimpleBundlesState.java b/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/SimpleBundlesState.java
index 3d95433..ee77bd8 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/SimpleBundlesState.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/SimpleBundlesState.java
@@ -218,7 +218,7 @@ public class SimpleBundlesState implements BundlesState {
this.bundleInfosList.clear();
LauncherData launcherData = manipulator.getLauncherData();
ConfigData configData = manipulator.getConfigData();
- File fwJar = getFwJar(launcherData);;
+ File fwJar = getFwJar(launcherData);
if (fwJar == null)
throw new IllegalStateException("launcherData.getLauncherConfigFile() == null && fwJar is not set.");
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/ConfigData.java b/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/ConfigData.java
index 9a15b65..55fe4a3 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/ConfigData.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/ConfigData.java
@@ -133,6 +133,7 @@ public class ConfigData {
initialBundleStartLevel = startLevel;
}
+ @Override
public String toString() {
StringBuffer sb = new StringBuffer();
sb.append("Class:" + getClass().getName() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/FrameworkAdminRuntimeException.java b/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/FrameworkAdminRuntimeException.java
index 0e99605..dbe1515 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/FrameworkAdminRuntimeException.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/FrameworkAdminRuntimeException.java
@@ -36,7 +36,7 @@ public class FrameworkAdminRuntimeException extends RuntimeException {
public FrameworkAdminRuntimeException(String message, Throwable cause, String reason) {
super(message);
this.reason = reason;
- this.cause = cause;
+ this.cause = cause;
}
/**
@@ -52,6 +52,7 @@ public class FrameworkAdminRuntimeException extends RuntimeException {
return reason;
}
+ @Override
public Throwable getCause() {
return cause;
}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/LauncherData.java b/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/LauncherData.java
index 6fcfb65..7f81a48 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/LauncherData.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/LauncherData.java
@@ -216,6 +216,7 @@ public class LauncherData {
this.addProgramArg(args[i]);
}
+ @Override
public String toString() {
StringBuffer sb = new StringBuffer();
sb.append("Class:" + this.getClass().getName() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processing/AbstractBufferingStep.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processing/AbstractBufferingStep.java
index 17e7b41..1152226 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processing/AbstractBufferingStep.java
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processing/AbstractBufferingStep.java
@@ -81,7 +81,7 @@ public abstract class AbstractBufferingStep extends ProcessingStep {
protected void cleanupTempFiles() {
}
- private void cleanupWorkDir() throws IOException {
+ private void cleanupWorkDir() {
if (workDir != null) {
FileUtils.deleteAll(workDir);
// TODO try twice since there seems to be some cases where the dir is not
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TranslationSupport.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TranslationSupport.java
index 571abd7..fbe4475 100644
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TranslationSupport.java
+++ b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TranslationSupport.java
@@ -46,7 +46,7 @@ public class TranslationSupport {
private final Map<String, SoftReference<IQueryResult<IInstallableUnit>>> localeCollectorCache = new HashMap<String, SoftReference<IQueryResult<IInstallableUnit>>>(2);
private LocaleProvider localeProvider;
- private boolean loggedMissingSource = false;;
+ private boolean loggedMissingSource = false;
public synchronized static TranslationSupport getInstance() {
if (instance == null)
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 76b3f40..a405e5d 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 53373f2..cb00d32 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 b13e7e7..5a5556e 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});
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/TestArtifactRepository.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/TestArtifactRepository.java
index c5e1300..eb81e2c 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/TestArtifactRepository.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/TestArtifactRepository.java
@@ -17,7 +17,6 @@ import java.net.URISyntaxException;
import java.util.*;
import org.eclipse.core.runtime.*;
import org.eclipse.equinox.internal.p2.artifact.repository.ArtifactRequest;
-import org.eclipse.equinox.internal.p2.repository.AuthenticationFailedException;
import org.eclipse.equinox.internal.p2.repository.Transport;
import org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager;
import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStepHandler;
@@ -77,12 +76,12 @@ public class TestArtifactRepository extends AbstractArtifactRepository {
}
@Override
- public InputStream stream(URI toDownload, IProgressMonitor monitor) throws FileNotFoundException, CoreException, AuthenticationFailedException {
+ public InputStream stream(URI toDownload, IProgressMonitor monitor) {
throw new IllegalStateException("Method should not be called");
}
@Override
- public long getLastModified(URI toDownload, IProgressMonitor monitor) throws CoreException, FileNotFoundException, AuthenticationFailedException {
+ public long getLastModified(URI toDownload, IProgressMonitor monitor) {
throw new IllegalStateException("Method should not be called");
}
};
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/ArtifactOutputStreamTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/ArtifactOutputStreamTest.java
index d36a545..e328197 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/ArtifactOutputStreamTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/ArtifactOutputStreamTest.java
@@ -147,7 +147,7 @@ public class ArtifactOutputStreamTest extends AbstractProvisioningTest {
}
}
- public void write(int b) throws IOException {
+ public void write(int b) {
if (baos != null)
baos.write(b);
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/Bug351944.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/Bug351944.java
index ee795e2..a511fc0 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/Bug351944.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/Bug351944.java
@@ -12,7 +12,6 @@ package org.eclipse.equinox.p2.tests.artifact.repository;
import java.io.File;
import java.net.URI;
-import java.net.URISyntaxException;
import java.util.*;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Platform;
@@ -57,7 +56,7 @@ public class Bug351944 extends AbstractProvisioningTest {
delete(artifactRepoFile);
}
- public void testSimpleRepositoryPerformanceOnLoadReadonlyLocalRepository() throws ProvisionException, URISyntaxException {
+ public void testSimpleRepositoryPerformanceOnLoadReadonlyLocalRepository() throws ProvisionException {
if (!Platform.OS_WIN32.equals(Platform.getOS())) {
final URI testRepo = artifactRepoFile.toURI();
IArtifactRepositoryManager artifactRepositoryManager = getArtifactRepositoryManager();
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/CorruptedJar.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/CorruptedJar.java
index 2400e33..99a39d5 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/CorruptedJar.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/CorruptedJar.java
@@ -46,7 +46,7 @@ public class CorruptedJar extends AbstractProvisioningTest {
ProvisioningContext ctx = new ProvisioningContext(getAgent());
ctx.setArtifactRepositories(new URI[] {getTestData("CorruptedJar repo", testDataLocation).toURI()});
DownloadManager mgr = new DownloadManager(ctx, getAgent());
- IArtifactKey key = (IArtifactKey) source.query(ArtifactKeyQuery.ALL_KEYS, null).iterator().next();
+ IArtifactKey key = source.query(ArtifactKeyQuery.ALL_KEYS, null).iterator().next();
mgr.add(new MirrorRequest(key, target, null, null, getTransport()));
IStatus s = mgr.start(new NullProgressMonitor());
assertNotOK(s);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/JarURLArtifactRepositoryTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/JarURLArtifactRepositoryTest.java
index 3fb2730..8b7e1c6 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/JarURLArtifactRepositoryTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/JarURLArtifactRepositoryTest.java
@@ -44,7 +44,7 @@ public class JarURLArtifactRepositoryTest extends TestCase {
manager = null;
}
- public void testJarURLRepository() throws ProvisionException, URISyntaxException {
+ public void testJarURLRepository() throws ProvisionException {
URL engineJar = TestActivator.getContext().getBundle().getEntry("/testData/enginerepo.jar");
URI jarRepoLocation = null;
try {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/processing/ProcessingStepTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/processing/ProcessingStepTest.java
index 293d50e..15948b1 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/processing/ProcessingStepTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/processing/ProcessingStepTest.java
@@ -67,7 +67,7 @@ public class ProcessingStepTest extends TestCase {
public void testFlush() throws IOException {
OutputStream destination = new OutputStream() {
- public void write(int b) throws IOException {
+ public void write(int b) {
}
public void flush() {
@@ -82,7 +82,7 @@ public class ProcessingStepTest extends TestCase {
public void testCloseSimpleOutputStreamAsDestination() throws IOException {
OutputStream destination = new OutputStream() {
- public void write(int b) throws IOException {
+ public void write(int b) {
}
public void close() {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/ProfileRegistryTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/ProfileRegistryTest.java
index 8610f4c..a28eb7e 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/ProfileRegistryTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/ProfileRegistryTest.java
@@ -257,7 +257,7 @@ public class ProfileRegistryTest extends AbstractProvisioningTest {
}
- public void testProfileLockingNested() throws IOException {
+ public void testProfileLockingNested() {
File testData = getTestData("0.1", "testData/engineTest/SimpleRegistry");
File tempFolder = getTempFolder();
copy("0.2", testData, tempFolder);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/ProfileTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/ProfileTest.java
index fae0e54..69fb0c3 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/ProfileTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/ProfileTest.java
@@ -229,7 +229,7 @@ public class ProfileTest extends AbstractProvisioningTest {
protected void handleRootAttributes(Attributes attributes) {
}
- public void startElement(String name, Attributes attributes) throws SAXException {
+ public void startElement(String name, Attributes attributes) {
if (PROFILES_ELEMENT.equals(name)) {
if (profilesHandler == null) {
profilesHandler = new ProfilesHandler(this, attributes);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/MetadataRepositoryManagerTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/MetadataRepositoryManagerTest.java
index 9da7f80..6a49b33 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/MetadataRepositoryManagerTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/MetadataRepositoryManagerTest.java
@@ -556,7 +556,7 @@ public class MetadataRepositoryManagerTest extends AbstractProvisioningTest {
assertEquals(1, loadRepository.query(QueryUtil.createIUAnyQuery(), null).toSet().size());
}
- public void testUnreadableFailingFilter() throws ProvisionException {
+ public void testUnreadableFailingFilter() {
File site = getTestData("unreadable", "/testData/metadataRepo/badFilter/unreadable");
PrintStream out = System.out;
try {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug252682.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug252682.java
index 856686a..7567b6e 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug252682.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug252682.java
@@ -10,11 +10,10 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.internal.p2.director.ProfileChangeRequest;
-
import java.io.File;
import java.util.ArrayList;
import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.equinox.internal.p2.director.ProfileChangeRequest;
import org.eclipse.equinox.internal.p2.engine.SimpleProfileRegistry;
import org.eclipse.equinox.p2.engine.*;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
@@ -44,7 +43,7 @@ public class Bug252682 extends AbstractProvisioningTest {
}
public void testInstallFeaturePatch() {
- IInstallableUnit p2Feature = (IInstallableUnit) profile.query(QueryUtil.createIUQuery("org.eclipse.equinox.p2.user.ui.feature.group"), new NullProgressMonitor()).iterator().next();
+ IInstallableUnit p2Feature = profile.query(QueryUtil.createIUQuery("org.eclipse.equinox.p2.user.ui.feature.group"), new NullProgressMonitor()).iterator().next();
System.out.println(p2Feature);
IQueryResult c = profile.query(QueryUtil.createIUQuery("org.eclipse.equinox.p2.core.patch"), new NullProgressMonitor());
assertEquals(1, queryResultSize(c));
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/NonMinimalState2.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/NonMinimalState2.java
index a82c0b2..ab9c8f7 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/NonMinimalState2.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/NonMinimalState2.java
@@ -10,9 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.internal.p2.director.ProfileChangeRequest;
-
import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.equinox.internal.p2.director.ProfileChangeRequest;
import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.engine.IProvisioningPlan;
import org.eclipse.equinox.p2.metadata.*;
@@ -62,7 +61,7 @@ public class NonMinimalState2 extends AbstractProvisioningTest {
IPlanner planner = createPlanner();
ProfileChangeRequest request = new ProfileChangeRequest(profile);
- request.addInstallableUnits((IInstallableUnit[]) getMetadataRepositoryManager().query(QueryUtil.createIUQuery("org.mortbay.jetty.server"), null).toArray(IInstallableUnit.class));
+ request.addInstallableUnits(getMetadataRepositoryManager().query(QueryUtil.createIUQuery("org.mortbay.jetty.server"), null).toArray(IInstallableUnit.class));
IProvisioningPlan plan = planner.getProvisioningPlan(request, null, new NullProgressMonitor());
assertOK("Plan OK", plan.getStatus());
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/repository/FileReaderTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/repository/FileReaderTest.java
index 04d7567..2deccbc 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/repository/FileReaderTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/repository/FileReaderTest.java
@@ -58,7 +58,7 @@ public class FileReaderTest extends AbstractTestServerClientCase {
/**
* Tests a successful read.
*/
- public void testRead() throws URISyntaxException, CoreException, IOException {
+ public void testRead() throws URISyntaxException {
RepositoryTransport transport = new RepositoryTransport();
URI toDownload = new URI(getBaseURL() + "/public/index.html");
OutputStream target = new ByteArrayOutputStream();
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/sharedinstall/AbstractSharedInstallTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/sharedinstall/AbstractSharedInstallTest.java
index b458836..1d93928 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/sharedinstall/AbstractSharedInstallTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/sharedinstall/AbstractSharedInstallTest.java
@@ -173,7 +173,7 @@ public abstract class AbstractSharedInstallTest extends AbstractReconcilerTest {
if (withConfigFlag)
args = new String[] {"-configuration", userBase.getAbsolutePath() + java.io.File.separatorChar + "configuration", "-application", "org.eclipse.equinox.p2.tests.verifier.application", "-verifier.properties", verifierConfig.getAbsolutePath(), "-consoleLog"};
else
- args = new String[] {"-application", "org.eclipse.equinox.p2.tests.verifier.application", "-verifier.properties", verifierConfig.getAbsolutePath(), "-consoleLog"};;
+ args = new String[] {"-application", "org.eclipse.equinox.p2.tests.verifier.application", "-verifier.properties", verifierConfig.getAbsolutePath(), "-consoleLog"};
assertEquals(0, runEclipse("Running verifier", output, args));
}
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 e47e2f5..9639094 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
@@ -10,14 +10,13 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.touchpoint.eclipse;
-import org.eclipse.equinox.internal.p2.director.ProfileChangeRequest;
-
import java.net.URI;
import java.net.URISyntaxException;
import java.util.HashMap;
import java.util.Map;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
+import org.eclipse.equinox.internal.p2.director.ProfileChangeRequest;
import org.eclipse.equinox.internal.p2.metadata.TouchpointInstruction;
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.ActionConstants;
@@ -220,7 +219,7 @@ public class AddRepositoryActionTest extends AbstractProvisioningTest {
//perform the update and install an ordinary bundle
IMetadataRepository repo = getMetadataRepositoryManager().loadRepository(site, getMonitor());
- IInstallableUnit bundle = (IInstallableUnit) repo.query(QueryUtil.createIUQuery("aBundle"), getMonitor()).iterator().next();
+ IInstallableUnit bundle = repo.query(QueryUtil.createIUQuery("aBundle"), getMonitor()).iterator().next();
request = new ProfileChangeRequest(profile);
final IInstallableUnit[] newIUs = new IInstallableUnit[] {newIU, bundle};
request.addInstallableUnits(newIUs);
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 1940667..d48c8a6 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
@@ -218,7 +218,7 @@ public class EclipseTouchpointTest extends AbstractProvisioningTest {
getArtifactRepositoryManager().addRepository(site);
IMetadataRepository repo = getMetadataRepositoryManager().loadRepository(site, getMonitor());
- IInstallableUnit iu = (IInstallableUnit) repo.query(QueryUtil.createIUQuery("test.bundle"), getMonitor()).iterator().next();
+ IInstallableUnit iu = repo.query(QueryUtil.createIUQuery("test.bundle"), getMonitor()).iterator().next();
assertNotNull(iu);
profile = createProfile("test", profileProperties);
ProfileChangeRequest request = new ProfileChangeRequest(profile);
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/operations/DiscoveryInstallOperation.java b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/operations/DiscoveryInstallOperation.java
index 023f04d..7959e5f 100644
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/operations/DiscoveryInstallOperation.java
+++ b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/operations/DiscoveryInstallOperation.java
@@ -102,7 +102,7 @@ public class DiscoveryInstallOperation implements IRunnableWithProgress {
}
}
- private InstallOperation resolve(IProgressMonitor monitor, final IInstallableUnit[] ius, URI[] repositories) throws CoreException {
+ private InstallOperation resolve(IProgressMonitor monitor, final IInstallableUnit[] ius, URI[] repositories) {
final InstallOperation installOperation = provisioningUI.getInstallOperation(Arrays.asList(ius), repositories);
installOperation.resolveModal(new SubProgressMonitor(monitor, installableConnectors.size()));
return installOperation;
diff --git a/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ImportWizard.java b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ImportWizard.java
index f059fef..0b6cab2 100644
--- a/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ImportWizard.java
+++ b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ImportWizard.java
@@ -95,7 +95,7 @@ public class ImportWizard extends InstallWizard implements IImportWizard {
operation = new InstallOperation(new ProvisioningSession(AbstractPage.agent), new ArrayList<IInstallableUnit>()) {
protected void computeProfileChangeRequest(MultiStatus status, IProgressMonitor monitor) {
monitor.done();
- };
+ }
public IStatus getResolutionResult() {
if (sub.isCanceled())
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstallWizard.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstallWizard.java
index e31f053..dce1d52 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstallWizard.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstallWizard.java
@@ -49,7 +49,7 @@ public class InstallWizard extends WizardWithLicenses {
}
protected ResolutionResultsWizardPage createResolutionPage() {
- return new InstallWizardPage(ui, this, root, (InstallOperation) operation);
+ return new InstallWizardPage(ui, this, root, operation);
}
protected ISelectableIUsPage createMainPage(IUElementListRoot input, Object[] selections) {
diff --git a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/UpdateSite.java b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/UpdateSite.java
index be6aeff..ba5bae2 100644
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/UpdateSite.java
+++ b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/UpdateSite.java
@@ -622,7 +622,7 @@ public class UpdateSite {
* Load and return the bundles that are referenced by this update site. Note this
* requires downloading and parsing the feature manifest locally.
*/
- private BundleDescription[] loadBundlesFromSite(IProgressMonitor monitor) throws ProvisionException {
+ private BundleDescription[] loadBundlesFromSite(IProgressMonitor monitor) {
SiteBundle[] siteBundles = site.getBundles();
Map<String, BundleDescription> tmpBundleCache = new HashMap<String, BundleDescription>(siteBundles.length);