Summary: | JavaModelException should stay instanciatable | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Martin Aeschlimann <martinae> | ||||
Component: | Core | Assignee: | Olivier Thomann <Olivier_Thomann> | ||||
Status: | VERIFIED FIXED | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | CC: | david_audel, jerome_lanneluc, Olivier_Thomann, philippe_mulet | ||||
Version: | 3.4 | Flags: | jerome_lanneluc:
review+
|
||||
Target Milestone: | 3.4 RC1 | ||||||
Hardware: | PC | ||||||
OS: | Windows XP | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Martin Aeschlimann
2008-04-30 10:43:57 EDT
The contract was not extracted from the comment, but from the component.xml. I agree that this contract was not obvious to clients, but the intent has never been to allow clients to instanciate this class. I can't really say if it was a good idea to instantiate JavaModelException. But what's important here is what the Javadoc on the type declaration said. The component.xml is overruled by that in case of a conflict. (In reply to comment #0) > Note that such fine differences are hard to detect as the old comment got > replaces by the new tags. I think it's better to keep the old comment so it's > easy to see that the change is not a change of rules. Actually I'm still seeing the old comment in I20080430-0100: * Instances of this class are automatically created by the Java model * when problems arise, so there is generally no need for clients to create * instances. The "@noinstantiate This class is not intended to be instantiated by clients" will trigger the API usage error. I can remove that line if Jérôme agrees. As Jérôme mentioned, it comes from the component.xml file. The old specification didn't explicitly forbid to create instances. * Instances of this class are automatically created by the Java model * when problems arise, so there is generally no need for clients to create * instances. So we should remove the @noinstantiate. Jérôme, Philippe ? If we are saying that the Javadoc takes precedence over the component.xml, then I agree we should remove @noinstanciate. Jérôme, +1 for 3.4RC1? +1 Created attachment 98696 [details]
Proposed fix
Jérôme, please review patch. Thanks. Released for 3.4RC1. Verified for 3.4RC1 using I20080510-2000 |