You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by dl...@apache.org on 2001/12/29 23:55:16 UTC

cvs commit: jakarta-turbine-3/src/java/org/apache/turbine/pipeline BasePipeline.java

dlr         01/12/29 14:55:16

  Modified:    src/java/org/apache/turbine/pipeline BasePipeline.java
  Log:
  Implemented new contract from Pipeline interface which says to perform
  a no-op when there are no more Valves attached to the Pipeline
  (instead of throwing a TurbineException).
  
  Revision  Changes    Path
  1.2       +3 -6      jakarta-turbine-3/src/java/org/apache/turbine/pipeline/BasePipeline.java
  
  Index: BasePipeline.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-3/src/java/org/apache/turbine/pipeline/BasePipeline.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -u -r1.1 -r1.2
  --- BasePipeline.java	29 Dec 2001 22:32:48 -0000	1.1
  +++ BasePipeline.java	29 Dec 2001 22:55:16 -0000	1.2
  @@ -174,16 +174,13 @@
           // Identify the current subscript for the current request thread
           Integer current = (Integer) state.get();
           int subscript = current.intValue();
  -        state.set(new Integer(subscript + 1));
   
  -        // Invoke the requested Valve for the current request thread
           if (subscript < valves.length)
           {
  +            // Invoke the requested Valve for the current request
  +            // thread and increment its thread-local state.
  +            state.set(new Integer(subscript + 1));
               valves[subscript].invoke(data, this);
  -        }
  -        else
  -        {
  -            throw new TurbineException("No more Valves on this Pipeline");
           }
       }
   }
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>