[jboss-jira] [JBoss JIRA] (DROOLS-2316) wrong ordering of ItemDefinition for compilation

Matteo Mortari (JIRA) issues at jboss.org
Mon Feb 12 06:43:00 EST 2018


Matteo Mortari created DROOLS-2316:
--------------------------------------

             Summary: wrong ordering of ItemDefinition for compilation
                 Key: DROOLS-2316
                 URL: https://issues.jboss.org/browse/DROOLS-2316
             Project: Drools
          Issue Type: Bug
          Components: dmn engine
            Reporter: Matteo Mortari
            Assignee: Matteo Mortari


The following exhibit the issue in the dmn compiler:

{code:java}
    @Test
    public void test3() {
        ItemDefinition tNumberList = build("tNumberList");
        ItemDefinition tTax        = build("tTax");
        ItemDefinition tStateModel = build("tStateModel");
        ItemDefinition tTaxList    = build("tTaxList", tTax);
        ItemDefinition tCategory   = build("tCategory");
        ItemDefinition tItem       = build("tItem", tCategory);
        ItemDefinition tItemList   = build("tItemList", tItem);
        ItemDefinition tOrder      = build("tOrder", tItemList);
     
        List<ItemDefinition> originalList = Arrays.asList(new ItemDefinition[]{
               tOrder,
               tItem,
               tCategory,
               tNumberList,
               tItemList,
               tTax,
               tStateModel,
               tTaxList
        });
        
        List<ItemDefinition> orderedList = orderingStrategy(originalList);
        
        assertTrue("Index of tCategory < tItem", orderedList.indexOf(tCategory) < orderedList.indexOf(tItem));
        assertTrue("Index of tItem < tItemList", orderedList.indexOf(tItem) < orderedList.indexOf(tItemList));
        assertTrue("Index of tItemList < tOrder", orderedList.indexOf(tItemList) < orderedList.indexOf(tOrder));
        
        assertTrue("Index of tTax < tTaxList", orderedList.indexOf(tTax) < orderedList.indexOf(tTaxList));
    }
{code}




--
This message was sent by Atlassian JIRA
(v7.5.0#75005)


More information about the jboss-jira mailing list