Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2015-10-23 13:31:43 -0400
committerUwe Stieber2015-10-23 13:31:43 -0400
commit92fa063487d44688c48b66082689684d5b75d5b1 (patch)
tree58e58776e443fa72df4a421f866b66518ccac904
parentdba4212520245605385ba8337191a5af434a02ec (diff)
downloadorg.eclipse.tcf-92fa063487d44688c48b66082689684d5b75d5b1.tar.gz
org.eclipse.tcf-92fa063487d44688c48b66082689684d5b75d5b1.tar.xz
org.eclipse.tcf-92fa063487d44688c48b66082689684d5b75d5b1.zip
Fix compatibility issue with platforms < Eclipse Neon
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/newWizard/NewWizardNode.java5
1 files changed, 3 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 e0834e9d1..c8068c030 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,7 +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.
*/
- private final <T> T getAdapter(Object sourceObject, Class<T> adapterType) {
+ private final <T> T getAdapter(Object sourceObject, Class<T> adapterType) {
Assert.isNotNull(adapterType);
if (sourceObject == null) {
return null;
@@ -170,7 +170,8 @@ import org.eclipse.ui.wizards.IWizardDescriptor;
}
if (!(sourceObject instanceof PlatformObject)) {
- T result = Platform.getAdapterManager().getAdapter(sourceObject, adapterType);
+ @SuppressWarnings("cast")
+ T result = (T) Platform.getAdapterManager().getAdapter(sourceObject, adapterType);
if (result != null) {
return result;
}

Back to the top