Commit 03cf53c8 authored by Hernan Ponce de Leon's avatar Hernan Ponce de Leon
Browse files

Using a local variable for iterator.eContainer() resulted in an infinite loop

I revert the change that uses a local variable
parent ac8526d9
BehaviorModelElementFactory.java 7e4e9de4fcac3790eb0664963dd2b403db1659d0 GREEN
ComponentArchitectureTransformationBase.java 8feabb8dc141d4e2c4d2f56526bffac06c6734ce GREEN
ComponentArchitectureUtils.java a593a80e91148ba1324e5c84de0feeec60004a90 GREEN
ComponentArchitectureUtils.java 80fcfc03ad4f9f383af463ad703a91211546dd79 YELLOW
ComponentLibraryModelElementFactory.java 186b2e27e184cac8149ac28a28343ecd76ddf157 GREEN
ComponentLibraryUtils.java 69bb291f7c5c9fb037fcc6b938793df2b1281b26 GREEN
ComponentModelElementFactory.java 2f3e136e37f56f3675121fa9c3515cc083f10d12 GREEN
......
......@@ -237,11 +237,10 @@ public class ComponentArchitectureUtils {
*/
public static Component getEnclosingComponent(EObject element) {
EObject iterator = element;
EObject container = iterator.eContainer();
while(container != null && !(container instanceof Component)) {
iterator = container;
while(iterator.eContainer() != null && !(iterator.eContainer() instanceof Component)) {
iterator = iterator.eContainer();
}
return (Component)container;
return (Component)iterator.eContainer();
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment