[ https://issues.apache.org/jira/browse/OFBIZ-10503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16566693#comment-16566693 ]
Mathieu Lirzin edited comment on OFBIZ-10503 at 8/2/18 12:27 PM: ----------------------------------------------------------------- Indeed, there is no order guarantee with basic {{groupingBy(classifier)}}. We need to use {{groupingBy(classifier, mapFactory, downstream)}} instead and use {{TreeMap::new}} as the map factory. Since the implemention is not that trivial anymore, I think it is better to refactor {{FormRenderer::getFieldListsByPosition}} than to inline it. I have updated the patch. was (Author: mthl): Indeed, there is no order guarantee with basic {{groupingBy(classifier)}}. We need to use {{groupingBy(classifer, mapFactory, downstream)}} instead and use {{TreeMap::new}} as the map factory. Since the implemention is not that trivial anymore, I think it is better to refactor {{FormRenderer::getFieldListsByPosition}} than to inline it. I have updated the patch. > Inline ‘getFieldListsByPosition’ method > --------------------------------------- > > Key: OFBIZ-10503 > URL: https://issues.apache.org/jira/browse/OFBIZ-10503 > Project: OFBiz > Issue Type: Improvement > Affects Versions: Trunk > Reporter: Mathieu Lirzin > Assignee: Gil Portenseigne > Priority: Minor > Attachments: OFBIZ_10503_Refactor-getFieldListsByPosition.patch > > > {{FormRenderer::getFieldListsByPosition}} is trivial to implement with a > {{Collectors::groupingBy}} collector. The attached patch inlines the two > calls of this private method and uses a stream based implementation instead. -- This message was sent by Atlassian JIRA (v7.6.3#76005)