tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hls...@apache.org
Subject svn commit: r961455 - /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/BindParameterWorker.java
Date Wed, 07 Jul 2010 18:27:32 GMT
Author: hlship
Date: Wed Jul  7 18:27:31 2010
New Revision: 961455

URL: http://svn.apache.org/viewvc?rev=961455&view=rev
Log:
TAP5-1197: Adjust for shared page instances, requiring some synchronization on the lazy initialization
of ParameterConduit inside the BoundParameterFieldValueConduit

Modified:
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/BindParameterWorker.java

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/BindParameterWorker.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/BindParameterWorker.java?rev=961455&r1=961454&r2=961455&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/BindParameterWorker.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/BindParameterWorker.java
Wed Jul  7 18:27:31 2010
@@ -50,6 +50,7 @@ public class BindParameterWorker impleme
 
         private final Class fieldType;
 
+        // Guarded by this
         private ParameterConduit conduit;
 
         private BoundParameterFieldValueConduit(String containerParameterName,
@@ -67,12 +68,11 @@ public class BindParameterWorker impleme
          * methods invoked
          * from the page loaded lifecycle method?
          */
-        private ParameterConduit getParameterConduit()
+        private synchronized ParameterConduit getParameterConduit()
         {
             if (conduit == null)
             {
                 conduit = containerResources.getParameterConduit(containerParameterName);
-
             }
 
             return conduit;
@@ -135,9 +135,10 @@ public class BindParameterWorker impleme
                 }
                 catch (Exception ex)
                 {
-                    throw new TapestryException(String.format("Failure binding parameter
field '%s' of mixin %s (type %s): %s",
-                            fieldName, resources.getCompleteId(),
-                            resources.getComponentModel().getComponentClassName(), InternalUtils.toMessage(ex)),
ex);
+                    throw new TapestryException(String.format(
+                            "Failure binding parameter field '%s' of mixin %s (type %s):
%s", fieldName, resources
+                                    .getCompleteId(), resources.getComponentModel().getComponentClassName(),
+                            InternalUtils.toMessage(ex)), ex);
                 }
             }
 



Mime
View raw message