cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject cvs commit: cocoon-2.2/src/java/org/apache/cocoon/environment ForwardRedirector.java
Date Wed, 29 Oct 2003 14:52:09 GMT
vgritsenko    2003/10/29 06:52:09

  Modified:    src/java/org/apache/cocoon/environment
                        ForwardRedirector.java
               src/java/org/apache/cocoon/environment
                        ForwardRedirector.java
  Log:
  Remove unused variables
  
  Revision  Changes    Path
  1.9       +15 -21    cocoon-2.1/src/java/org/apache/cocoon/environment/ForwardRedirector.java
  
  Index: ForwardRedirector.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/environment/ForwardRedirector.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ForwardRedirector.java	15 Oct 2003 21:02:24 -0000	1.8
  +++ ForwardRedirector.java	29 Oct 2003 14:52:09 -0000	1.9
  @@ -66,12 +66,11 @@
    */
   public class ForwardRedirector extends AbstractLogEnabled implements Redirector, PermanentRedirector
{
   
  -    /** Was there a call to <code>redirect()</code> ? */
  +    /**
  +     * Was there a call to <code>redirect()</code> ?
  +     */
       private boolean hasRedirected = false;
       
  -    /** Was the redirect to a "cocoon:/" (and not "cocoon://") ?
  -    private boolean hasLocalRedirect = false;
  -
       /** The <code>Environment to use for redirection (either internal or external)
*/
       private Environment env;
   
  @@ -85,16 +84,16 @@
        * environment.
        */
       public void redirect(boolean sessionMode, String url) throws IOException, ProcessingException
{
  -
           if (getLogger().isInfoEnabled()) {
               getLogger().info("Redirecting to '" + url + "'");
           }
   
           if (url.startsWith("cocoon:")) {
  -            cocoonRedirect(sessionMode, url);
  +            cocoonRedirect(url);
           } else {
  -            env.redirect(sessionMode, url);
  +            this.env.redirect(sessionMode, url);
           }
  +
           this.hasRedirected = true;
       }
   
  @@ -104,14 +103,14 @@
           }
   
           if (url.startsWith("cocoon:")) {
  -            cocoonRedirect(sessionMode, url);
  +            cocoonRedirect(url);
           } else if (env instanceof PermanentRedirector) {
               ((PermanentRedirector)env).permanentRedirect(sessionMode, url);
           } else {
  -            env.redirect(sessionMode, url);
  +            this.env.redirect(sessionMode, url);
           }
  -        this.hasRedirected = true;
   
  +        this.hasRedirected = true;
       }
   
       /**
  @@ -119,27 +118,22 @@
        * subpipeline.
        */
       public void globalRedirect(boolean sessionMode, String url) throws IOException, ProcessingException
{
  -
           if (getLogger().isInfoEnabled()) {
               getLogger().info("Redirecting to '" + url + "'");
           }
   
           // FIXME : how to handle global redirect to cocoon: ?
           if (url.startsWith("cocoon:")) {
  -            cocoonRedirect(sessionMode, url);
  +            cocoonRedirect(url);
  +        } else if (env instanceof EnvironmentWrapper) {
  +            ((EnvironmentWrapper)env).globalRedirect(sessionMode,url);
           } else {
  -            if (env instanceof EnvironmentWrapper) {
  -              ((EnvironmentWrapper)env).globalRedirect(sessionMode,url);
  -            }
  -            else {
  -              env.redirect(sessionMode, url);
  -            }
  +            this.env.redirect(sessionMode, url);
           }
           this.hasRedirected = true;
       }
   
  -    private void cocoonRedirect(boolean sessionMode, String uri)
  -    throws IOException, ProcessingException {
  +    private void cocoonRedirect(String uri) {
           // Simply notify the Processor.
           this.env.setAttribute(TreeProcessor.COCOON_REDIRECT_ATTR, uri);
       }
  
  
  
  1.10      +15 -21    cocoon-2.2/src/java/org/apache/cocoon/environment/ForwardRedirector.java
  
  Index: ForwardRedirector.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/src/java/org/apache/cocoon/environment/ForwardRedirector.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ForwardRedirector.java	15 Oct 2003 21:03:38 -0000	1.9
  +++ ForwardRedirector.java	29 Oct 2003 14:52:09 -0000	1.10
  @@ -66,12 +66,11 @@
    */
   public class ForwardRedirector extends AbstractLogEnabled implements Redirector, PermanentRedirector
{
   
  -    /** Was there a call to <code>redirect()</code> ? */
  +    /**
  +     * Was there a call to <code>redirect()</code> ?
  +     */
       private boolean hasRedirected = false;
       
  -    /** Was the redirect to a "cocoon:/" (and not "cocoon://") ?
  -    private boolean hasLocalRedirect = false;
  -
       /** The <code>Environment to use for redirection (either internal or external)
*/
       private Environment env;
   
  @@ -85,16 +84,16 @@
        * environment.
        */
       public void redirect(boolean sessionMode, String url) throws IOException, ProcessingException
{
  -
           if (getLogger().isInfoEnabled()) {
               getLogger().info("Redirecting to '" + url + "'");
           }
   
           if (url.startsWith("cocoon:")) {
  -            cocoonRedirect(sessionMode, url);
  +            cocoonRedirect(url);
           } else {
  -            env.redirect(sessionMode, url);
  +            this.env.redirect(sessionMode, url);
           }
  +
           this.hasRedirected = true;
       }
   
  @@ -104,14 +103,14 @@
           }
   
           if (url.startsWith("cocoon:")) {
  -            cocoonRedirect(sessionMode, url);
  +            cocoonRedirect(url);
           } else if (env instanceof PermanentRedirector) {
               ((PermanentRedirector)env).permanentRedirect(sessionMode, url);
           } else {
  -            env.redirect(sessionMode, url);
  +            this.env.redirect(sessionMode, url);
           }
  -        this.hasRedirected = true;
   
  +        this.hasRedirected = true;
       }
   
       /**
  @@ -119,27 +118,22 @@
        * subpipeline.
        */
       public void globalRedirect(boolean sessionMode, String url) throws IOException, ProcessingException
{
  -
           if (getLogger().isInfoEnabled()) {
               getLogger().info("Redirecting to '" + url + "'");
           }
   
           // FIXME : how to handle global redirect to cocoon: ?
           if (url.startsWith("cocoon:")) {
  -            cocoonRedirect(sessionMode, url);
  +            cocoonRedirect(url);
  +        } else if (env instanceof EnvironmentWrapper) {
  +            ((EnvironmentWrapper)env).globalRedirect(sessionMode,url);
           } else {
  -            if (env instanceof EnvironmentWrapper) {
  -              ((EnvironmentWrapper)env).globalRedirect(sessionMode,url);
  -            }
  -            else {
  -              env.redirect(sessionMode, url);
  -            }
  +            this.env.redirect(sessionMode, url);
           }
           this.hasRedirected = true;
       }
   
  -    private void cocoonRedirect(boolean sessionMode, String uri)
  -    throws IOException, ProcessingException {
  +    private void cocoonRedirect(String uri) {
           // Simply notify the Processor.
           this.env.setAttribute(TreeProcessor.COCOON_REDIRECT_ATTR, uri);
       }
  
  
  

Mime
View raw message