You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@metamodel.apache.org by "Kasper Sørensen (JIRA)" <ji...@apache.org> on 2017/10/22 21:52:00 UTC
[jira] [Commented] (METAMODEL-1168) MetaModelHelper getGrouped API
call triggers a StackOverflow
[ https://issues.apache.org/jira/browse/METAMODEL-1168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16214467#comment-16214467 ]
Kasper Sørensen commented on METAMODEL-1168:
--------------------------------------------
Hmm I just looked at this, and yes it does look like a bug. I think this was introduced as we converted arrays into collections. Probably we can delete the method since the List based one is just as good.
> MetaModelHelper getGrouped API call triggers a StackOverflow
> ------------------------------------------------------------
>
> Key: METAMODEL-1168
> URL: https://issues.apache.org/jira/browse/METAMODEL-1168
> Project: Apache MetaModel
> Issue Type: Bug
> Affects Versions: 5.0.0
> Reporter: Jamie goodyear
>
> MetaModelHelper getGrouped public method:
> {quote}
> public static DataSet getGrouped(List<SelectItem> selectItems, DataSet dataSet,
> Collection<GroupByItem> groupByItems) {
> return getGrouped(selectItems, dataSet, groupByItems);
> }
> {quote}
> When this API is called:
> {quote}
> public void testGetGroupedByCollection() {
> List<SelectItem> selectItems = new ArrayList<>();
> DataSet inputDataSet = null;
> Collection<GroupByItem> groupByItemCollection = null;
> DataSet dataSet = MetaModelHelper.getGrouped(selectItems, inputDataSet, groupByItemCollection);
> assertNotNull(dataSet);
> }
> {quote}
> It results in a Stackoverflow:
> {quote}
> Tests in error:
> MetaModelHelperTest.testGetGroupedByCollection » StackOverflow
> {quote}
> This call should either be removed, or altered to break the recursive loop.
> Was the intent to convert "Collection<GroupByItem>" to a List<GroupByItem> for calling that getGrouped signature?
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)