Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2017-09-18 11:01:42 +0000
committerAlexander Kurtakov2017-09-18 11:07:36 +0000
commitb5d0da887f41fb106ecba2d4ccdff9a10e9cff1a (patch)
tree606c576fd21390bd71103c7990ff6a54bcd1be6e /bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonNavigator.java
parentee3cbf1c0fcccce0c308c5d2b6ebc9c0fd6c3d12 (diff)
downloadeclipse.platform.ui-b5d0da887f41fb106ecba2d4ccdff9a10e9cff1a.tar.gz
eclipse.platform.ui-b5d0da887f41fb106ecba2d4ccdff9a10e9cff1a.tar.xz
eclipse.platform.ui-b5d0da887f41fb106ecba2d4ccdff9a10e9cff1a.zip
Bug 521922 - Fix compiler warnings coming from platform.uiI20170918-2000
rawtypes and unchecked fixes. Change-Id: Ic15475c21f57ce04f5173dea7510dce8a1982b8e Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonNavigator.java')
-rw-r--r--bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonNavigator.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonNavigator.java b/bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonNavigator.java
index acf1c498777..6cf10298119 100644
--- a/bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonNavigator.java
+++ b/bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonNavigator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2015 IBM Corporation and others.
+ * Copyright (c) 2003, 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
@@ -447,16 +447,15 @@ public class CommonNavigator extends ViewPart implements ISetSelectionTarget, IS
* have an adapter for the given class
*/
@Override
- @SuppressWarnings("unchecked")
public <T> T getAdapter(Class<T> adapter) {
if (adapter == CommonViewer.class) {
- return (T) getCommonViewer();
+ return adapter.cast(getCommonViewer());
} else if (adapter == INavigatorContentService.class) {
- return (T) getCommonViewer().getNavigatorContentService();
+ return adapter.cast(getCommonViewer().getNavigatorContentService());
} else if (adapter == IShowInTarget.class) {
- return (T) this;
+ return adapter.cast(this);
} else if (adapter == IShowInSource.class) {
- return (T) getShowInSource();
+ return adapter.cast(getShowInSource());
}
return super.getAdapter(adapter);
}

Back to the top