[ http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1370?page=all ]
Jesus M. Rodriguez updated XDT-1370: ------------------------------------ Attachment: patch.diff This is a patch for the sorting bug. > sort attribute not working in AbstractProgramElementTagsHandler.forAllMembers > ----------------------------------------------------------------------------- > > Key: XDT-1370 > URL: http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1370 > Project: XDoclet > Type: Bug > Components: Core > Versions: 1.2.3 > Environment: win2k > Reporter: Phritz Grau > Assignee: xdoclet-devel (Use for new issues) > Priority: Trivial > Attachments: patch.diff > > Original Estimate: 10 minutes > Remaining: 10 minutes > > template codes like > <XDtField:forAllFields superclasses="false" sort="true"> > dont work, i.e. the sort attribute has no effect. > I looked up the implementation in > AbstractProgramElementTagsHandler.forAllMembers > you can find the code block: > if (sort) { > // sort fields, but we should make a copy first, because members > is not a new copy, it's shared by all > List sortedMembers = new ArrayList(members); > members = sortedMembers; > } > But this should be: > if (sort) { > // sort fields, but we should make a copy first, because members > is not a new copy, it's shared by all > List sortedMembers = new ArrayList(members); > Collections.sort(sortedMembers); > members = sortedMembers; > } > The latter code work fine for me. > Thanks. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/xdoclet/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira _______________________________________________ xdoclet-devel mailing list xdoclet-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xdoclet-devel