You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by mf...@apache.org on 2011/01/25 22:10:41 UTC

svn commit: r1063461 - /myfaces/portlet-bridge/core/trunk_2.0.x/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeImpl.java

Author: mfreedman
Date: Tue Jan 25 21:10:41 2011
New Revision: 1063461

URL: http://svn.apache.org/viewvc?rev=1063461&view=rev
Log:
PORTLETBRIDGE-175: Bridge phase listeners have portlet dependency but can be executed in a servlet request yielding ClassCastException

Modified:
    myfaces/portlet-bridge/core/trunk_2.0.x/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeImpl.java

Modified: myfaces/portlet-bridge/core/trunk_2.0.x/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeImpl.java
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/trunk_2.0.x/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeImpl.java?rev=1063461&r1=1063460&r2=1063461&view=diff
==============================================================================
--- myfaces/portlet-bridge/core/trunk_2.0.x/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeImpl.java (original)
+++ myfaces/portlet-bridge/core/trunk_2.0.x/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeImpl.java Tue Jan 25 21:10:41 2011
@@ -2607,7 +2607,7 @@ public class BridgeImpl
     // There is only one lifecycle instance within a webapp -- and lifecycles aren't thread safe
     // This means we may have multiple listeners registered and/or multiple simulataneous requests
     // So only do the work if the FacesContext of the event is equal to the one in the current thread
-    if (context != FacesContext.getCurrentInstance())
+    if (context != FacesContext.getCurrentInstance() || !BridgeUtil.isPortletRequest())
     {
       return;
     }
@@ -2651,7 +2651,7 @@ public class BridgeImpl
     // There is only one lifecycle instance within a webapp -- and lifecycles aren't thread safe
     // This means we may have multiple listeners registered and/or multiple simulataneous requests
     // So only do the work if the FacesContext of the event is equal to the one in the current thread
-    if (context != FacesContext.getCurrentInstance())
+    if (context != FacesContext.getCurrentInstance() || !BridgeUtil.isPortletRequest())
     {
       return;
     }