From 95c856529f7d0531a3cecd075f0db6fffe57c425 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ronny=20B=C3=B6ttger?= <s6013406@mail.zih.tu-dresden.de>
Date: Wed, 24 Nov 2021 08:36:06 +0100
Subject: [PATCH] fixed plays: removed attributeExists

---
 .../src/main/jastadd/AttributeTransfer.jadd                 | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/statemachine.solution/src/main/jastadd/AttributeTransfer.jadd b/statemachine.solution/src/main/jastadd/AttributeTransfer.jadd
index d9a2b7c..c001c5e 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;
-- 
GitLab