Author: hlship
Date: Fri Oct  7 18:41:04 2011
New Revision: 1180146

URL: http://svn.apache.org/viewvc?rev=1180146&view=rev
Log:
TAP-1650: Remove extra synchronization that is (probably) not needed

Modified:
    
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentInstantiatorSourceImpl.java

Modified: 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentInstantiatorSourceImpl.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentInstantiatorSourceImpl.java?rev=1180146&r1=1180145&r2=1180146&view=diff
==============================================================================
--- 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentInstantiatorSourceImpl.java
 (original)
+++ 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentInstantiatorSourceImpl.java
 Fri Oct  7 18:41:04 2011
@@ -228,40 +228,32 @@ public final class ComponentInstantiator
                 {
                     public Instantiator invoke()
                     {
-                        ClassLoader proxyClassLoader = 
proxyFactory.getClassLoader();
+                        // Force the creation of the class (and the 
transformation of the class). This will first
+                        // trigger transformations of any base classes.
 
-                        // Not 100% sure this is needed, now that the 
proxyFactory and the PlasticManager share the same class loader.
+                        final ClassInstantiator<Component> plasticInstantiator 
= manager.getClassInstantiator(className);
 
-                        synchronized (proxyClassLoader)
-                        {
-                            // Force the creation of the class (and the 
transformation of the class). This will first
-                            // trigger transformations of any base classes.
+                        final ComponentModel model = 
classToModel.get(className);
 
-                            final ClassInstantiator<Component> 
plasticInstantiator = manager
-                                    .getClassInstantiator(className);
+                        return new Instantiator()
+                        {
+                            public Component 
newInstance(InternalComponentResources resources)
+                            {
+                                return 
plasticInstantiator.with(ComponentResources.class, resources)
+                                        
.with(InternalComponentResources.class, resources).newInstance();
+                            }
 
-                            final ComponentModel model = 
classToModel.get(className);
+                            public ComponentModel getModel()
+                            {
+                                return model;
+                            }
 
-                            return new Instantiator()
+                            @Override
+                            public String toString()
                             {
-                                public Component 
newInstance(InternalComponentResources resources)
-                                {
-                                    return 
plasticInstantiator.with(ComponentResources.class, resources)
-                                            
.with(InternalComponentResources.class, resources).newInstance();
-                                }
-
-                                public ComponentModel getModel()
-                                {
-                                    return model;
-                                }
-
-                                @Override
-                                public String toString()
-                                {
-                                    return String.format("[Instantiator[%s]", 
className);
-                                }
-                            };
-                        }
+                                return String.format("[Instantiator[%s]", 
className);
+                            }
+                        };
                     }
                 });
     }


Reply via email to