Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2015-10-23 13:47:45 -0400
committerUwe Stieber2015-10-23 13:47:45 -0400
commit7134719a5d5b3b1ab4fc29fabb8cf5347e64a6d2 (patch)
treec72d6867b22b780404c431db01c98a645fc5ed8f
parent930bf72a74e9aab8262c3688675962a72f59e837 (diff)
downloadorg.eclipse.tcf-7134719a5d5b3b1ab4fc29fabb8cf5347e64a6d2.tar.gz
org.eclipse.tcf-7134719a5d5b3b1ab4fc29fabb8cf5347e64a6d2.tar.xz
org.eclipse.tcf-7134719a5d5b3b1ab4fc29fabb8cf5347e64a6d2.zip
Fix another compatibility issue
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/newWizard/NewWizardNode.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/newWizard/NewWizardNode.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/newWizard/NewWizardNode.java
index c8068c030..81f6c8c20 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/newWizard/NewWizardNode.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/newWizard/NewWizardNode.java
@@ -149,6 +149,7 @@ import org.eclipse.ui.wizards.IWizardDescriptor;
* Instead of referring to the internal <code>org.eclipse.ui.internal.util.Util</code> class,
* copy the <code>getAdapter</code> method here, so it can work with every platform.
*/
+ @SuppressWarnings("cast")
private final <T> T getAdapter(Object sourceObject, Class<T> adapterType) {
Assert.isNotNull(adapterType);
if (sourceObject == null) {
@@ -161,7 +162,7 @@ import org.eclipse.ui.wizards.IWizardDescriptor;
if (sourceObject instanceof IAdaptable) {
IAdaptable adaptable = (IAdaptable) sourceObject;
- T result = adaptable.getAdapter(adapterType);
+ T result = (T) adaptable.getAdapter(adapterType);
if (result != null) {
// Sanity-check
Assert.isTrue(adapterType.isInstance(result));
@@ -170,7 +171,6 @@ import org.eclipse.ui.wizards.IWizardDescriptor;
}
if (!(sourceObject instanceof PlatformObject)) {
- @SuppressWarnings("cast")
T result = (T) Platform.getAdapterManager().getAdapter(sourceObject, adapterType);
if (result != null) {
return result;

Back to the top