Bug 360230 - Infinite loop in MetaclassManager.getMetaclass(Object)
Summary: Infinite loop in MetaclassManager.getMetaclass(Object)
Status: NEW
Alias: None
Product: XWT
Classification: Technology
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-07 09:21 EDT by Alexey Romanov CLA
Modified: 2013-01-24 15:31 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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