You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2008/06/20 20:14:57 UTC

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

Author: hlship
Date: Fri Jun 20 11:14:56 2008
New Revision: 670014

URL: http://svn.apache.org/viewvc?rev=670014&view=rev
Log:
TAPESTRY-2468: A deadlock related to class loading (and creation) can occur

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=670014&r1=670013&r2=670014&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 Jun 20 11:14:56 2008
@@ -72,8 +72,19 @@
             super(parent, classPool);
         }
 
+        /**
+         * Determines if the class name represents a component class from a controlled package.  If so,
+         * super.findClass() will load it and transform it. Returns null if not in a controlled package, allowing the
+         * parent class loader to do the work.
+         * <p/>
+         * This method is synchronized to <em>attempt</em> to address TAPESTRY-2468.
+         *
+         * @param className
+         * @return the loaded transformed Class, or null to force a load of the class from the parent class loader
+         * @throws ClassNotFoundException
+         */
         @Override
-        protected Class findClass(String className) throws ClassNotFoundException
+        protected synchronized Class findClass(String className) throws ClassNotFoundException
         {
             if (inControlledPackage(className)) return super.findClass(className);