ItEr43S09ImplantacionAplicacionItEr42S13: [Bug #242] Fixing bug.
It was caused because the sibling elements labels were included in the check
This commit is contained in:
parent
f2522839ad
commit
045c8d3205
1 changed files with 6 additions and 5 deletions
|
|
@ -779,16 +779,17 @@ public abstract class OrderElement extends BaseEntity implements
|
|||
}
|
||||
|
||||
private boolean checkConstraintLabelNotRepeatedInTheSameBranch(
|
||||
HashSet<Label> labels) {
|
||||
HashSet<Label> parentLabels) {
|
||||
HashSet<Label> withThisLabels = new HashSet<Label>(parentLabels);
|
||||
for (Label label : getLabels()) {
|
||||
if (containsLabel(labels, label)) {
|
||||
if (containsLabel(withThisLabels, label)) {
|
||||
return false;
|
||||
}
|
||||
labels.add(label);
|
||||
withThisLabels.add(label);
|
||||
}
|
||||
|
||||
for (OrderElement child : getChildren()) {
|
||||
if (!child.checkConstraintLabelNotRepeatedInTheSameBranch(labels)) {
|
||||
if (!child
|
||||
.checkConstraintLabelNotRepeatedInTheSameBranch(withThisLabels)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue