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

Gavin King gavin.king at jboss.com
Tue Dec 19 17:54:44 EST 2006


  User: gavin   
  Date: 06/12/19 17:54:44

  Modified:    src/main/org/jboss/seam/contexts 
                        ServerConversationContext.java
  Log:
  fix npe
  
  Revision  Changes    Path
  1.19      +7 -4      jboss-seam/src/main/org/jboss/seam/contexts/ServerConversationContext.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ServerConversationContext.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/contexts/ServerConversationContext.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -b -r1.18 -r1.19
  --- ServerConversationContext.java	13 Dec 2006 04:54:19 -0000	1.18
  +++ ServerConversationContext.java	19 Dec 2006 22:54:44 -0000	1.19
  @@ -26,7 +26,7 @@
    * 
    * @author Gavin King
    * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
  - * @version $Revision: 1.18 $
  + * @version $Revision: 1.19 $
    */
   public class ServerConversationContext implements Context {
   
  @@ -206,9 +206,7 @@
       */
      public void flush()
      {      
  -      Manager manager = Manager.instance();
  -      boolean longRunning = manager.isLongRunningConversation() ||
  -            !manager.getCurrentConversationId().equals( getId() );  
  +      boolean longRunning = !isCurrent() || Manager.instance().isLongRunningConversation();  
         if ( longRunning )
         {
            //force update for dirty mutable objects
  @@ -244,6 +242,11 @@
         }
      }
   
  +   private boolean isCurrent()
  +   {
  +      return id==null || id.equals( Manager.instance().getCurrentConversationId() );
  +   }
  +
      @Override
      public String toString()
      {
  
  
  



More information about the jboss-cvs-commits mailing list