Skip to content
Snippets Groups Projects
Commit 95c85652 authored by Ronny Böttger's avatar Ronny Böttger
Browse files

fixed plays: removed attributeExists

parent f7c3d705
No related branches found
No related tags found
No related merge requests found
......@@ -7,21 +7,17 @@ aspect AttributeTransfer {
this.getRolesList().insertChild(rt, 0);
// transfer attributes
boolean attributeExists;
int attributeIndex;
for (Attribute rtAttribute : rt.getAttributeList()) {
attributeExists = false;
attributeIndex = 0;
for (Attribute ntAttribute : this.getAttributeList()) {
if (ntAttribute.getName() == rtAttribute.getName()) {
attributeExists = true;
this.getAttributeList().removeChild(attributeIndex);
this.getAttributeList().insertChild(rtAttribute, 0);
break;
}
attributeIndex++;
}
if (!attributeExists) this.getAttributeList().insertChild(rtAttribute, 0);
this.getAttributeList().insertChild(rtAttribute, 0);
}
return this;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment