Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 360230

Summary: Infinite loop in MetaclassManager.getMetaclass(Object)
Product: [Technology] XWT Reporter: Alexey Romanov <alexey.v.romanov>
Component: CoreAssignee: Project Inbox <e4.xwt-inbox>
Status: NEW --- QA Contact:
Severity: minor    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Alexey Romanov CLA 2011-10-07 09:21:55 EDT
Build Identifier: org.eclipse.e4.xwt.source_0.9.1.v20110603

Code for this method says: 

	public IMetaclass getMetaclass(Object object) {
		if (object instanceof Class) {
			return getMetaclass((Class<?>) object);
		} else if (object instanceof String) { <<
			return getMetaclass((String) object);
		}
		Class<?> type = object.getClass();
		return getMetaclass(type);
	}

Since there is no getMetaclass(String) method, it will enter an infinite loop if `object instanceof String` returns true. Since the method doesn't seem to be called from anywhere, the bug is at most minor.

Reproducible: Always