diff options
author | Alexander Kurtakov | 2017-09-18 11:01:42 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2017-09-18 11:07:36 +0000 |
commit | b5d0da887f41fb106ecba2d4ccdff9a10e9cff1a (patch) | |
tree | 606c576fd21390bd71103c7990ff6a54bcd1be6e /bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonNavigator.java | |
parent | ee3cbf1c0fcccce0c308c5d2b6ebc9c0fd6c3d12 (diff) | |
download | eclipse.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.java | 11 |
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); } |