jvanzyl     02/01/18 15:25:54

  Modified:    src/java/org/apache/turbine/pipeline RunModulesValve.java
  Log:
  - removing redundant code
  
  Revision  Changes    Path
  1.2       +5 -32     
jakarta-turbine-3/src/java/org/apache/turbine/pipeline/RunModulesValve.java
  
  Index: RunModulesValve.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-3/src/java/org/apache/turbine/pipeline/RunModulesValve.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RunModulesValve.java      18 Jan 2002 03:34:59 -0000      1.1
  +++ RunModulesValve.java      18 Jan 2002 23:25:54 -0000      1.2
  @@ -74,7 +74,7 @@
    * release 2 
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>James Taylor</a>
  - * @version $Id: RunModulesValve.java,v 1.1 2002/01/18 03:34:59 jvanzyl Exp $
  + * @version $Id: RunModulesValve.java,v 1.2 2002/01/18 23:25:54 jvanzyl Exp $
    */
   public class RunModulesValve 
       implements Valve
  @@ -120,8 +120,6 @@
           
           Module module; 
           
  -        determineTarget( data );
  -
           target = normalizeTarget( data.getTarget() );
           
           while( ! oldTarget.equals( target ) ) 
  @@ -145,38 +143,13 @@
           // Set the target to the final normalized path, which will be used by
           // the resolver and the appropriate TemplateEngineService to locate the
           // template.
  -        
  -        data.setTarget( target );
  -    }
  -    
  -    /**
  -     * Responsible for determining the initial target from the request 
  -     * parameters. If no target is found the 'homepage' will be used.
  -     */
  -    public void determineTarget( RunData data )
  -    {
  -        if ( ! data.hasTarget() )
  -        {
  -            String target = data.getParameters().getString( "template" );
  -
  -            if ( target != null )
  -            {
  -                data.setTarget( target );
  -                
  -                log.debug( "Set target from request parameter" );
  -            }
  -            else
  -            {
  -                data.setTarget( defaultTarget );
  -                    
  -                log.debug( "Set target using default value" );
  -            }
  -        }
  -        
  +       
           if ( log.isDebugEnabled() )
           {
  -            log.debug( "Target is now: " + data.getTarget() );
  +            log.debug( "Setting target to " + target );
           }
  +        
  +        data.setTarget( target );
       }
       
       /**
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to