Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2019-08-08 10:16:54 -0400
committerAlexander Kurtakov2019-08-09 05:03:08 -0400
commitc673caf92ee19d59f03095ca5d15943a6e0ac540 (patch)
treef1213278e2087aba6f7ae86cbce617d0e3f22283
parent6e99703e26d222623b325df6912e9f71f7cab365 (diff)
downloadorg.eclipse.cdt-c673caf92ee19d59f03095ca5d15943a6e0ac540.tar.gz
org.eclipse.cdt-c673caf92ee19d59f03095ca5d15943a6e0ac540.tar.xz
org.eclipse.cdt-c673caf92ee19d59f03095ca5d15943a6e0ac540.zip
Remove unneeded suppress warnings.
Change-Id: I6b552fd94ced0cd8c0d489386d4b594ae7df8fdf Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/FieldEditorOverlayPage.java1
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/DsfDebugUITools.java26
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/breakpoints/BreakpointVMProvider.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/concurrent/DisplayDsfExecutor.java3
-rw-r--r--launch/org.eclipse.cdt.docker.launcher/META-INF/MANIFEST.MF2
-rw-r--r--launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/docker/launcher/ContainerCommandLauncherFactory.java1
-rw-r--r--launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ContainerDataVolumeDialog.java3
7 files changed, 15 insertions, 23 deletions
diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/FieldEditorOverlayPage.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/FieldEditorOverlayPage.java
index 6a47f9da13..393c2c7819 100644
--- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/FieldEditorOverlayPage.java
+++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/FieldEditorOverlayPage.java
@@ -332,7 +332,6 @@ public abstract class FieldEditorOverlayPage extends FieldEditorPreferencePage i
/**
* Creates a new preferences page and opens it
*/
- @SuppressWarnings("cast")
protected void configureWorkspaceSettings() {
try {
// create a new instance of the current class
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/DsfDebugUITools.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/DsfDebugUITools.java
index b4c430c94e..fa707dc1cb 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/DsfDebugUITools.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/DsfDebugUITools.java
@@ -35,22 +35,18 @@ public class DsfDebugUITools {
/**
* @since 2.1
*/
- @SuppressWarnings("unchecked")
public static void enableActivity(final String activityID, final boolean enableit) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- @Override
- public void run() {
- IWorkbenchActivitySupport workbenchActivitySupport = PlatformUI.getWorkbench().getActivitySupport();
- IActivityManager activityManager = workbenchActivitySupport.getActivityManager();
- Set<String> enabledActivityIds = new HashSet<String>(activityManager.getEnabledActivityIds());
- boolean changed = false;
- if (enableit)
- changed = enabledActivityIds.add(activityID);
- else
- changed = enabledActivityIds.remove(activityID);
- if (changed)
- workbenchActivitySupport.setEnabledActivityIds(enabledActivityIds);
- }
+ PlatformUI.getWorkbench().getDisplay().asyncExec(() -> {
+ IWorkbenchActivitySupport workbenchActivitySupport = PlatformUI.getWorkbench().getActivitySupport();
+ IActivityManager activityManager = workbenchActivitySupport.getActivityManager();
+ Set<String> enabledActivityIds = new HashSet<>(activityManager.getEnabledActivityIds());
+ boolean changed = false;
+ if (enableit)
+ changed = enabledActivityIds.add(activityID);
+ else
+ changed = enabledActivityIds.remove(activityID);
+ if (changed)
+ workbenchActivitySupport.setEnabledActivityIds(enabledActivityIds);
});
}
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/breakpoints/BreakpointVMProvider.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/breakpoints/BreakpointVMProvider.java
index a25654d5a0..d699947880 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/breakpoints/BreakpointVMProvider.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/breakpoints/BreakpointVMProvider.java
@@ -112,7 +112,7 @@ public class BreakpointVMProvider extends AbstractVMProvider {
@Override
protected void retrieve(final DataRequestMonitor<List<BreakpointOrganizerVMContext>> rm) {
getNestingCategoryBreakpoints(fParentPath, new DataRequestMonitor<IBreakpoint[]>(getExecutor(), rm) {
- @SuppressWarnings({ "cast", "unchecked" })
+ @SuppressWarnings({ "unchecked" })
@Override
protected void handleSuccess() {
Map<IAdaptable, List<IBreakpoint>> bpsLists = new HashMap<>();
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/concurrent/DisplayDsfExecutor.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/concurrent/DisplayDsfExecutor.java
index 33ce2e84d8..34f12789d7 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/concurrent/DisplayDsfExecutor.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/concurrent/DisplayDsfExecutor.java
@@ -275,9 +275,8 @@ public class DisplayDsfExecutor extends DefaultDsfExecutor {
* Override to prevent clients from shutting down. The executor will be
* shut down when the underlying display is discovered to be shut down.
*/
- @SuppressWarnings({ "cast", "unchecked" })
@Override
public List<Runnable> shutdownNow() {
- return Collections.EMPTY_LIST;
+ return Collections.emptyList();
}
}
diff --git a/launch/org.eclipse.cdt.docker.launcher/META-INF/MANIFEST.MF b/launch/org.eclipse.cdt.docker.launcher/META-INF/MANIFEST.MF
index 5788703946..a44458de9e 100644
--- a/launch/org.eclipse.cdt.docker.launcher/META-INF/MANIFEST.MF
+++ b/launch/org.eclipse.cdt.docker.launcher/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Plugin.name
Bundle-SymbolicName: org.eclipse.cdt.docker.launcher;singleton:=true
-Bundle-Version: 1.2.200.qualifier
+Bundle-Version: 1.2.300.qualifier
Bundle-Activator: org.eclipse.cdt.docker.launcher.DockerLaunchUIPlugin
Bundle-Vendor: %Plugin.vendor
Bundle-Localization: plugin
diff --git a/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/docker/launcher/ContainerCommandLauncherFactory.java b/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/docker/launcher/ContainerCommandLauncherFactory.java
index 3cfb3df417..24a48609bc 100644
--- a/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/docker/launcher/ContainerCommandLauncherFactory.java
+++ b/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/docker/launcher/ContainerCommandLauncherFactory.java
@@ -49,7 +49,6 @@ public class ContainerCommandLauncherFactory implements ICommandLauncherFactory,
private IProject project;
- @SuppressWarnings("restriction")
@Override
public ICommandLauncher getCommandLauncher(IProject project) {
this.project = project;
diff --git a/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ContainerDataVolumeDialog.java b/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ContainerDataVolumeDialog.java
index 75f4626aa4..be205a63b0 100644
--- a/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ContainerDataVolumeDialog.java
+++ b/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ContainerDataVolumeDialog.java
@@ -233,8 +233,7 @@ public class ContainerDataVolumeDialog extends Dialog {
}
private void setupValidationSupport(final Label errorMessageIcon, final Label errorMessageLabel) {
- for (@SuppressWarnings("unchecked")
- Iterator<Binding> iterator = dbc.getBindings().iterator(); iterator.hasNext();) {
+ for (Iterator<Binding> iterator = dbc.getBindings().iterator(); iterator.hasNext();) {
final Binding binding = iterator.next();
binding.getModel().addChangeListener(onDataVolumeSettingsChanged(errorMessageIcon, errorMessageLabel));
}

Back to the top