OW2 Consortium
Search OW2 Mail Archive: 

Advanced Search - Powered by Google


Mail Archive Home | fractal-commits List | Febuary 2006 Index

<--  Date Index  --> <--  Thread Index  -->

CVS update of aokell/src/org/objectweb/fractal/aokell/lib/control/factory (1 file)


    Date: Monday, February 27, 2006 @ 18:45:40
  Author: seintur
    Path: .../aokell/src/org/objectweb/fractal/aokell/lib/control/factory

Modified: AbstractFactoryImpl.java

Bug fix: remove redundant cloning of the attribute controller state for 
parametric components.


--------------------------+
 AbstractFactoryImpl.java |   45 ---------------------------------------------
 1 files changed, 45 deletions(-)


Index: 
aokell/src/org/objectweb/fractal/aokell/lib/control/factory/AbstractFactoryImpl.java
diff -u 
aokell/src/org/objectweb/fractal/aokell/lib/control/factory/AbstractFactoryImpl.java:1.4
 
aokell/src/org/objectweb/fractal/aokell/lib/control/factory/AbstractFactoryImpl.java:1.5
--- 
aokell/src/org/objectweb/fractal/aokell/lib/control/factory/AbstractFactoryImpl.java:1.4
    Thu Feb 23 22:06:39 2006
+++ 
aokell/src/org/objectweb/fractal/aokell/lib/control/factory/AbstractFactoryImpl.java
        Mon Feb 27 18:45:40 2006
@@ -29,7 +29,6 @@
 
 import org.objectweb.fractal.aokell.lib.control.CloneCtrlException;
 import org.objectweb.fractal.aokell.lib.control.Controller;
-import 
org.objectweb.fractal.aokell.lib.control.attribute.AttributeControllerItf;
 import org.objectweb.fractal.aokell.lib.control.component.ComponentDescItf;
 import org.objectweb.fractal.aokell.lib.control.component.ComponentItf;
 import org.objectweb.fractal.aokell.lib.util.FractalHelper;
@@ -99,24 +98,6 @@
                 newContent,
                 new Class[]{BindingController.class, 
LifeCycleController.class});
         
-        /*
-         * Copy the state of the attribute controllers.
-         */
-        for( Iterator iter = newContent.entrySet().iterator(); 
iter.hasNext(); ) {
-            
-            Map.Entry entry = (Map.Entry) iter.next();
-            ComponentItf c = (ComponentItf) entry.getKey();
-            Component newC = (Component) entry.getValue();
-            
-            try {
-                copyAttributeControllerState(c,newC,newContent);
-            }
-            catch( CloneCtrlException cce ) {
-                cce.printStackTrace();
-                throw new InstantiationException(cce.getMessage());
-            }                                                
-        }        
-        
         return newComponent;
     }
     
@@ -202,32 +183,6 @@
         }
     }
     
-    /**
-     * Copy the state of the attribute controller which is in the same 
membrane
-     * as the current factory controller into the attribute controller of the
-     * newly created component.
-     * 
-     * @param newComponent  the newly created component
-     * @param newContent    all newly created components
-     */
-    protected void copyAttributeControllerState(
-            Component component, Component newComponent, Map newContent )
-    throws CloneCtrlException {
-        
-        Controller ctrl = null;
-        
-        try {
-            ctrl = (Controller)
-                component.getFcInterface(AttributeControllerItf.NAME);
-        }
-        catch( Exception e ) {
-            // The component is not parametric
-            return;
-        }
-        
-        ctrl.cloneFcCtrl(newComponent,newContent);
-    }
-    
     
     // --------------------------------------------------------------
     // Controller implementation



<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 2006-2007, OW2 Consortium | contact | webmaster.