You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2011/06/29 23:14:46 UTC

svn commit: r1141251 - in /myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/lifecycle: LifecycleImpl.java PhaseListenerManager.java

Author: lu4242
Date: Wed Jun 29 21:14:46 2011
New Revision: 1141251

URL: http://svn.apache.org/viewvc?rev=1141251&view=rev
Log:
revert code committed on MYFACES-2355 "ExceptionHandler not redirecting to error page for exceptions thrown during listeners attached to render response phase" because it does not comply with JSF 2.0 spec section 12.3 PhaseListener

Modified:
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/lifecycle/LifecycleImpl.java
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/lifecycle/PhaseListenerManager.java

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/lifecycle/LifecycleImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/lifecycle/LifecycleImpl.java?rev=1141251&r1=1141250&r2=1141251&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/lifecycle/LifecycleImpl.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/lifecycle/LifecycleImpl.java Wed Jun 29 21:14:46 2011
@@ -229,14 +229,14 @@ public class LifecycleImpl extends Lifec
                 // let the PhaseExecutor do some pre-phase actions
                 renderExecutor.doPrePhaseActions(facesContext);
                 
-                boolean renderResponse = phaseListenerMgr.informPhaseListenersBefore(renderExecutor.getPhase());
+                phaseListenerMgr.informPhaseListenersBefore(renderExecutor.getPhase());
                 // also possible that one of the listeners completed the response
                 if (isResponseComplete(facesContext, renderExecutor.getPhase(), true))
                 {
                     return;
                 }
-                if(renderResponse || facesContext.getExceptionHandler().getClass().equals(ClassUtils.classForName("javax.faces.webapp.PreJsf2ExceptionHandlerFactory$PreJsf2ExceptionHandlerImpl")))
-                    renderExecutor.execute(facesContext);
+                
+                renderExecutor.execute(facesContext);
             }
             
             catch (Throwable e) {

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/lifecycle/PhaseListenerManager.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/lifecycle/PhaseListenerManager.java?rev=1141251&r1=1141250&r2=1141251&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/lifecycle/PhaseListenerManager.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/lifecycle/PhaseListenerManager.java Wed Jun 29 21:14:46 2011
@@ -61,7 +61,7 @@ class PhaseListenerManager
         return (listenerPhaseId == PhaseId.ANY_PHASE.getOrdinal() || listenerPhaseId == phaseId.getOrdinal());
     }
 
-    boolean informPhaseListenersBefore(PhaseId phaseId)
+    void informPhaseListenersBefore(PhaseId phaseId)
     {
         boolean[] beforePhaseSuccess = new boolean[phaseListeners.length];
         listenerSuccessMap.put(phaseId, beforePhaseSuccess);
@@ -84,17 +84,10 @@ class PhaseListenerManager
                     
                     publishException (e, phaseId, ExceptionQueuedEventContext.IN_BEFORE_PHASE_KEY);
                     
-                    return false;   //if this is the render phase, do not render so we can go to the error page
+                    return;
                 }
             }
         }
-        
-        if( facesContext.getExceptionHandler().getUnhandledExceptionQueuedEvents().iterator().hasNext())
-        {
-            return false;   //an exception was queued, do not render so we can go to the error page 
-        }
-        
-        return true; //if this is the render phase, render the response
     }
 
     void informPhaseListenersAfter(PhaseId phaseId)