//# 0 errors, 45 messages
//#
/*
    //#DebugFilter.java:1:1: class: org.apache.roller.weblogger.ui.core.filters.DebugFilter
* Licensed to the Apache Software Foundation (ASF) under one or more
*  contributor license agreements.  The ASF licenses this file to You
* under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.  For additional information regarding
* copyright in this work, please see the NOTICE file in the top level
* directory of this distribution.
*/

package org.apache.roller.weblogger.ui.core.filters;

import java.io.IOException;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;


/**
 * A simple debugging filter.
 *
 * This filter is NOT mapped by default and is here only for Roller developers
 * to use while they are working on the code and debugging things.
 *
 * @web.filter name="DebugFilter"
 */
public class DebugFilter implements Filter {
    //#DebugFilter.java:42: method: void org.apache.roller.weblogger.ui.core.filters.DebugFilter.org.apache.roller.weblogger.ui.core.filters.DebugFilter()
    //#DebugFilter.java:42: end of method: void org.apache.roller.weblogger.ui.core.filters.DebugFilter.org.apache.roller.weblogger.ui.core.filters.DebugFilter()
    
    private static Log log = LogFactory.getLog(DebugFilter.class);
    //#DebugFilter.java:44: method: org.apache.roller.weblogger.ui.core.filters.DebugFilter.org.apache.roller.weblogger.ui.core.filters.DebugFilter__static_init
    //#DebugFilter.java:44: Warning: method not available
    //#    -- call on Log org.apache.commons.logging.LogFactory:getLog(Class)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.core.filters.DebugFilter
    //#    method: org.apache.roller.weblogger.ui.core.filters.DebugFilter__static_init
    //#    unanalyzed callee: Log org.apache.commons.logging.LogFactory:getLog(Class)
    //#output(org.apache.roller.weblogger.ui.core.filters.DebugFilter__static_init): __Descendant_Table[org/apache/roller/weblogger/ui/core/filters/DebugFilter]
    //#output(org.apache.roller.weblogger.ui.core.filters.DebugFilter__static_init): __Dispatch_Table.destroy()V
    //#output(org.apache.roller.weblogger.ui.core.filters.DebugFilter__static_init): __Dispatch_Table.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V
    //#output(org.apache.roller.weblogger.ui.core.filters.DebugFilter__static_init): __Dispatch_Table.init(Ljavax/servlet/FilterConfig;)V
    //#output(org.apache.roller.weblogger.ui.core.filters.DebugFilter__static_init): log
    //#post(org.apache.roller.weblogger.ui.core.filters.DebugFilter__static_init): __Descendant_Table[org/apache/roller/weblogger/ui/core/filters/DebugFilter] == &__Dispatch_Table
    //#post(org.apache.roller.weblogger.ui.core.filters.DebugFilter__static_init): __Dispatch_Table.destroy()V == &destroy
    //#post(org.apache.roller.weblogger.ui.core.filters.DebugFilter__static_init): __Dispatch_Table.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V == &doFilter
    //#post(org.apache.roller.weblogger.ui.core.filters.DebugFilter__static_init): __Dispatch_Table.init(Ljavax/servlet/FilterConfig;)V == &init
    //#post(org.apache.roller.weblogger.ui.core.filters.DebugFilter__static_init): init'ed(log)
    //#DebugFilter.java:44: end of method: org.apache.roller.weblogger.ui.core.filters.DebugFilter.org.apache.roller.weblogger.ui.core.filters.DebugFilter__static_init
    
    
    public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain)
            throws IOException, ServletException {
        
        HttpServletRequest request = (HttpServletRequest) req;
    //#DebugFilter.java:50: method: void org.apache.roller.weblogger.ui.core.filters.DebugFilter.doFilter(ServletRequest, ServletResponse, FilterChain)
    //#input(void doFilter(ServletRequest, ServletResponse, FilterChain)): "   bufferSize = "._tainted
    //#input(void doFilter(ServletRequest, ServletResponse, FilterChain)): "   isCommited = "._tainted
    //#input(void doFilter(ServletRequest, ServletResponse, FilterChain)): "ENTERING "._tainted
    //#input(void doFilter(ServletRequest, ServletResponse, FilterChain)): "EXITING "._tainted
    //#input(void doFilter(ServletRequest, ServletResponse, FilterChain)): chain
    //#input(void doFilter(ServletRequest, ServletResponse, FilterChain)): log
    //#input(void doFilter(ServletRequest, ServletResponse, FilterChain)): req
    //#input(void doFilter(ServletRequest, ServletResponse, FilterChain)): res
    //#pre[1] (void doFilter(ServletRequest, ServletResponse, FilterChain)): chain != null
    //#pre[2] (void doFilter(ServletRequest, ServletResponse, FilterChain)): log != null
    //#pre[3] (void doFilter(ServletRequest, ServletResponse, FilterChain)): req != null
    //#pre[4] (void doFilter(ServletRequest, ServletResponse, FilterChain)): res != null
        HttpServletResponse response = (HttpServletResponse) res;
        
        log.info("ENTERING "+request.getRequestURL());
    //#DebugFilter.java:53: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:info(Object)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.core.filters.DebugFilter
    //#    method: void doFilter(ServletRequest, ServletResponse, FilterChain)
    //#    unanalyzed callee: void org.apache.commons.logging.Log:info(Object)
        
        // some info about the request and response
        log.info("Response Object:");
    //#DebugFilter.java:56: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:info(Object)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.core.filters.DebugFilter
    //#    method: void doFilter(ServletRequest, ServletResponse, FilterChain)
    //#    unanalyzed callee: void org.apache.commons.logging.Log:info(Object)
        log.info("   isCommited = "+response.isCommitted());
    //#DebugFilter.java:57: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:info(Object)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.core.filters.DebugFilter
    //#    method: void doFilter(ServletRequest, ServletResponse, FilterChain)
    //#    unanalyzed callee: void org.apache.commons.logging.Log:info(Object)
        log.info("   bufferSize = "+response.getBufferSize());
    //#DebugFilter.java:58: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:info(Object)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.core.filters.DebugFilter
    //#    method: void doFilter(ServletRequest, ServletResponse, FilterChain)
    //#    unanalyzed callee: void org.apache.commons.logging.Log:info(Object)
        log.info("");
    //#DebugFilter.java:59: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:info(Object)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.core.filters.DebugFilter
    //#    method: void doFilter(ServletRequest, ServletResponse, FilterChain)
    //#    unanalyzed callee: void org.apache.commons.logging.Log:info(Object)
        
        chain.doFilter(request, response);
        
        log.info("EXITING "+request.getRequestURL());
    //#DebugFilter.java:63: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:info(Object)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.core.filters.DebugFilter
    //#    method: void doFilter(ServletRequest, ServletResponse, FilterChain)
    //#    unanalyzed callee: void org.apache.commons.logging.Log:info(Object)
        
        // some info about the request and response
        log.info("Response Object:");
    //#DebugFilter.java:66: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:info(Object)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.core.filters.DebugFilter
    //#    method: void doFilter(ServletRequest, ServletResponse, FilterChain)
    //#    unanalyzed callee: void org.apache.commons.logging.Log:info(Object)
        log.info("   isCommited = "+response.isCommitted());
    //#DebugFilter.java:67: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:info(Object)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.core.filters.DebugFilter
    //#    method: void doFilter(ServletRequest, ServletResponse, FilterChain)
    //#    unanalyzed callee: void org.apache.commons.logging.Log:info(Object)
        log.info("   bufferSize = "+response.getBufferSize());
    //#DebugFilter.java:68: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:info(Object)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.core.filters.DebugFilter
    //#    method: void doFilter(ServletRequest, ServletResponse, FilterChain)
    //#    unanalyzed callee: void org.apache.commons.logging.Log:info(Object)
        log.info("");
    //#DebugFilter.java:69: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:info(Object)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.core.filters.DebugFilter
    //#    method: void doFilter(ServletRequest, ServletResponse, FilterChain)
    //#    unanalyzed callee: void org.apache.commons.logging.Log:info(Object)
    }
    //#DebugFilter.java:70: end of method: void org.apache.roller.weblogger.ui.core.filters.DebugFilter.doFilter(ServletRequest, ServletResponse, FilterChain)
    
    
    public void destroy() {}
    //#DebugFilter.java:73: method: void org.apache.roller.weblogger.ui.core.filters.DebugFilter.destroy()
    //#DebugFilter.java:73: end of method: void org.apache.roller.weblogger.ui.core.filters.DebugFilter.destroy()
    
    
    public void init(FilterConfig filterConfig) {}
    //#DebugFilter.java:76: method: void org.apache.roller.weblogger.ui.core.filters.DebugFilter.init(FilterConfig)
    //#DebugFilter.java:76: end of method: void org.apache.roller.weblogger.ui.core.filters.DebugFilter.init(FilterConfig)
    
}
    //#DebugFilter.java:: end of class: org.apache.roller.weblogger.ui.core.filters.DebugFilter
