[jboss-cvs] jboss-seam/src/main/org/jboss/seam/exceptions ...

Gavin King gavin.king at jboss.com
Tue Dec 19 23:35:55 EST 2006


  User: gavin   
  Date: 06/12/19 23:35:55

  Modified:    src/main/org/jboss/seam/exceptions   DebugPageHandler.java
                        ExceptionHandler.java
  Log:
  fix npe for exception in restore view phase
  
  Revision  Changes    Path
  1.2       +2 -1      jboss-seam/src/main/org/jboss/seam/exceptions/DebugPageHandler.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: DebugPageHandler.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/exceptions/DebugPageHandler.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- DebugPageHandler.java	17 Dec 2006 19:46:41 -0000	1.1
  +++ DebugPageHandler.java	20 Dec 2006 04:35:55 -0000	1.2
  @@ -35,7 +35,8 @@
      public boolean isHandler(Exception e)
      {
         return Lifecycle.getPhaseId()!=PhaseId.RENDER_RESPONSE && 
  -            Lifecycle.getPhaseId()!=null;
  +            Lifecycle.getPhaseId()!=null &&
  +            Contexts.isConversationContextActive();
      }
      
      @Override
  
  
  
  1.2       +7 -3      jboss-seam/src/main/org/jboss/seam/exceptions/ExceptionHandler.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ExceptionHandler.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/exceptions/ExceptionHandler.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- ExceptionHandler.java	17 Dec 2006 19:46:41 -0000	1.1
  +++ ExceptionHandler.java	20 Dec 2006 04:35:55 -0000	1.2
  @@ -5,6 +5,7 @@
   
   import javax.faces.context.FacesContext;
   
  +import org.jboss.seam.contexts.Contexts;
   import org.jboss.seam.core.FacesMessages;
   import org.jboss.seam.core.Navigator;
   import org.jboss.seam.util.Strings;
  @@ -49,12 +50,15 @@
      
      public static void addFacesMessage(Exception e, String message)
      {
  +      if ( Contexts.isConversationContextActive() )
  +      {
         message = getDisplayMessage(e, message);
         if ( !Strings.isEmpty(message) )
         {
            FacesMessages.instance().add(message);
         }
      }
  +   }
      
      public static Object rethrow(Exception e) throws Exception
      {
  
  
  



More information about the jboss-cvs-commits mailing list