Skip to content
Snippets Groups Projects
Commit 65893d0d authored by Jonas Blatt's avatar Jonas Blatt :ant:
Browse files

Fix empty names = no names

parent 0c3c485a
No related branches found
No related tags found
No related merge requests found
......@@ -99,7 +99,7 @@ public class SimpleVDmnParser implements DmnModelInstanceWrapper {
VDmnDecisionImpl.Builder decisionBuilder = VDmnDecisionImpl.getBuilder().withDecisionId(id);
decisionBuilderMap.put(id, decisionBuilder);
// Add name, if present
if (decision.getName() != null) {
if (decision.getName() != null && !decision.getName().isEmpty()) {
decisionBuilder.withName(decision.getName());
}
// Add DmnDecisionBuilder to definitionBuilder
......@@ -132,11 +132,12 @@ public class SimpleVDmnParser implements DmnModelInstanceWrapper {
.withInputExpressionId(new InputExpressionId(inputCol.getInputExpression().getId()))
.withTypeRef(type);
// name
if (inputCol.getInputExpression().getText() != null) {
if (inputCol.getInputExpression().getText() != null
&& !inputCol.getInputExpression().getText().getTextContent().isEmpty()) {
builder.withName(inputCol.getInputExpression().getText().getTextContent());
}
// label
if (inputCol.getLabel() != null) {
if (inputCol.getLabel() != null && !inputCol.getLabel().isEmpty()) {
builder.withLabel(inputCol.getLabel());
}
// Add Builder to builder list
......@@ -162,11 +163,11 @@ public class SimpleVDmnParser implements DmnModelInstanceWrapper {
.withOutputId(new OutputId(outputCol.getId()))
.withTypeRef(VTypeRef.getTypeRefFromName(outputCol.getTypeRef()));
// name
if (outputCol.getName() != null) {
if (outputCol.getName() != null && !outputCol.getName().isEmpty()) {
builder.withName(outputCol.getName());
}
// label
if (outputCol.getLabel() != null) {
if (outputCol.getLabel() != null && !outputCol.getLabel().isEmpty()) {
builder.withLabel(outputCol.getLabel());
}
// Add Builder to builder list
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment