| Summary: | Enclosed elements are returned in alpha order, not in source code order | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Stefan Ocke <stefan.ocke> |
| Component: | APT | Assignee: | Generic inbox for the JDT-APT component <jdt-apt-inbox> |
| Status: | CLOSED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | eclipse |
| Version: | 4.3.1 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Stefan Ocke
The javadoc of javax.lang.model.element.TypeElement.getEnclosedElements() says: "Note that as a particular instance of the general accuracy requirements and the ordering behavior required of this interface, the list of enclosed elements will be returned in the natural order for the originating source of information about the type. For example, if the information about the type is originating from a source file, the elements will be returned in source code order. (However, in that case the the ordering of synthesized elements, such as a default constructor, is not specified.)" I read this as "enclosed elements must be returned in source code order". But Eclipse always returns the elements in alphabetical order, which is against the specification. (This is at least the case for fields. For methods, I have not yet tested.) *** This bug has been marked as a duplicate of bug 300408 *** |