diff --git a/statemachine.solution/src/main/jastadd/AttributeTransfer.jadd b/statemachine.solution/src/main/jastadd/AttributeTransfer.jadd index d9a2b7c0aa19dce7429fde9aeb2c9412a14558fe..c001c5e3752964e21e2c824966d3f4cf12e6c149 100644 --- a/statemachine.solution/src/main/jastadd/AttributeTransfer.jadd +++ b/statemachine.solution/src/main/jastadd/AttributeTransfer.jadd @@ -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;