Bug 121235 - [emfworkbench] Translator: call to a setter with member field instead of the parameter
Summary: [emfworkbench] Translator: call to a setter with member field instead of the ...
Status: CLOSED FIXED
Alias: None
Product: WTP Common Tools
Classification: WebTools
Component: wst.common (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 1.5 M6   Edit
Assignee: John Lanuti CLA
QA Contact:
URL:
Whiteboard:
Keywords: greatbug
Depends on:
Blocks:
 
Reported: 2005-12-16 12:00 EST by Olivier Nouguier CLA
Modified: 2006-11-28 15:58 EST (History)
0 users

See Also:


Attachments
patch constructor call to setEMFClass (695 bytes, patch)
2005-12-16 12:05 EST, Olivier Nouguier CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Nouguier CLA 2005-12-16 12:00:26 EST
In class org.eclipse.wst.common.internal.emf.resource.Translalor, line 174
In the constructor:

public Translator(String domNameAndPath, EStructuralFeature aFeature, EClass eClass) {
	this(domNameAndPath, aFeature);
	setEMFClass(emfClass);
}

the call of: 
setEMFClass(emfClass);
should be:
setEMFClass(eClass);

As consequence, DOM2EMF "deserialization" lead to an error, when it encounter an abstact class. Because the real (aka non abstract) eclass is ignored and always "null"

The error message was:
java.lang.IllegalArgumentException: The class 'Element' is not a valid classifier
Element is an abstract class.
Comment 1 Olivier Nouguier CLA 2005-12-16 12:05:05 EST
Created attachment 31883 [details]
patch constructor call to setEMFClass
Comment 2 David Williams CLA 2005-12-28 10:29:32 EST
changing target from 1.5 M1 to 1.5 M5 to reflect new numbering system as we join Collisto. 
Comment 3 John Lanuti CLA 2006-03-06 11:21:16 EST
This is fixed and released for the WTP 1.5 M6 03/07/06 driver.
Comment 4 David Williams CLA 2006-04-13 16:49:06 EDT
I'd like to nominate this as a "greatbug". (Even though open "a while ago") it was just recently fixed due to the orinator spotting it in some pretty "deep" code, on the edges of code that unites two components (wtp and emf) and even supplying a patch ... so, I think it well represents the "community spirit" of Eclipse and its many projects. 

Comment 5 John Lanuti CLA 2006-11-28 15:58:55 EST
This is part of a mass update to close out all stale WTP resolved bugs from the 1.0.x and 1.5.0 timeframe.  If you feel this bug was closed inappropriately, please reopen.

Thanks, John Lanuti