Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local collection updated but never queried #67

Closed
dbmalkovsky opened this issue Dec 13, 2016 · 1 comment
Closed

Local collection updated but never queried #67

dbmalkovsky opened this issue Dec 13, 2016 · 1 comment

Comments

@dbmalkovsky
Copy link
Contributor

In org.flowable.editor.dmn.converter.DmnJsonConverter.java there appears that in two occasions where there is a mismatch between the updating and querying of a collection.

In the first case inputClauseMap is added to but never queried; starting around line 100:

        Map<String, InputClause> inputClauseMap = new HashMap<>();
        ArrayNode inputExpressionsNode = objectMapper.createArrayNode();

        for (InputClause clause : definition.getCurrentDecisionTable().getInputs()) {

            LiteralExpression inputExpression = clause.getInputExpression();
            inputClauseMap.put(inputExpression.getId(), clause);

            ObjectNode inputExpressionNode = objectMapper.createObjectNode();
            inputExpressionNode.put("id", inputExpression.getId());
            inputExpressionNode.put("type", inputExpression.getTypeRef());
            inputExpressionNode.put("label", inputExpression.getLabel());
            inputExpressionNode.put("variableId", inputExpression.getText());

            inputExpressionsNode.add(inputExpressionNode);
        }

The second case is for the variable outputClauseMap starting around line 120:

        Map<String, OutputClause> outputClauseMap = new HashMap<>();
        ArrayNode outputExpressionsNode = objectMapper.createArrayNode();

        for (OutputClause clause : definition.getCurrentDecisionTable().getOutputs()) {

            outputClauseMap.put(clause.getId(), clause);

            ObjectNode outputExpressionNode = objectMapper.createObjectNode();
            outputExpressionNode.put("id", clause.getId());
            outputExpressionNode.put("type", clause.getTypeRef());
            outputExpressionNode.put("label", clause.getLabel());
            outputExpressionNode.put("variableId", clause.getName());

            outputExpressionsNode.add(outputExpressionNode);
        }

This should be reviewed to see if the code is unneeded or there is some other error.

tijsrademakers added a commit that referenced this issue Dec 13, 2016
@tijsrademakers
Copy link
Contributor

The maps didn't have a purpose, so removed them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants