Method uses the same code for two branches

Description

There are two files where the branches of an if condition execute the same code.

(1) method processDI() in org.activiti.engine.impl.bpmn.parser.BpmnParse lines 477-482 where the contents of the LOGGER.warn message is exactly the same for either condition:

LOGGER.warn("Invalid reference in diagram interchange definition: " + bpmnReference + " does not reference a sequence flow");

(2) method validate() in org.activiti.validation.validator.impl.DiagramInterchangeInfoValidator lines 51-57 where the parameters to the addWarning() method are exatcly the same for either condition:

addWarning(errors, Problems.DI_DOES_NOT_REFERENCE_SEQ_FLOW, null, bpmnModel.getFlowElement(bpmnReference),
"Invalid reference in diagram interchange definition: " + bpmnReference + " does not reference a sequence flow");

Either the conditional can be removed are the messaging needs improvement.

Environment

None

Assignee

Tijs Rademakers

Reporter

David Malkovsky

Labels

None

Components

Fix versions

Affects versions

Priority

Major
Configure