Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 333450 - Cast exception in org.eclipse.xtext.nodemodel.impl.CompositeNodeWithSemanticElement
Summary: Cast exception in org.eclipse.xtext.nodemodel.impl.CompositeNodeWithSemanticE...
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.0.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: M5   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-04 03:53 EST by Mark Christiaens CLA
Modified: 2017-09-19 17:37 EDT (History)
2 users (show)

See Also:
sebastian.zarnekow: indigo+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Christiaens CLA 2011-01-04 03:53:17 EST
Build Identifier: 20100917-0705

I don't know the exact context in which this occurred but I got a cast exception in 

	public boolean isAdapterForType(Object type) {
		return INode.class.isAssignableFrom((Class<?>)type);
	}



Reproducible: Couldn't Reproduce
Comment 1 Mark Christiaens CLA 2011-01-04 04:01:34 EST
I modified it to 
	
public boolean isAdapterForType(Object type) {
		return type instanceof Class <?> && INode.class.isAssignableFrom((Class<?>)type);
	}

and did not notice any further problems.  But frankly, I don't exactly know what I'm doing here so this may not be a good patch.
Comment 2 Sebastian Zarnekow CLA 2011-01-04 05:11:27 EST
Fixed. Thanks for the pointer and the patch.
Comment 3 Karsten Thoms CLA 2017-09-19 17:26:19 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 4 Karsten Thoms CLA 2017-09-19 17:37:41 EDT
Closing all bugs that were set to RESOLVED before Neon.0