Update of /var/cvs/contributions/CMSContainer_Portlets/portlets-jforum/src/java/org/jahia/jahiawebapps/jforum In directory james.mmbase.org:/tmp/cvs-serv7203/portlets-jforum/src/java/org/jahia/jahiawebapps/jforum
Modified Files: Tag: b1_5 HttpServletResponseWrapper.java HttpServletRequestWrapper.java Log Message: CMSC-907 - Clean up code: convert to better methods; fix naming convention violations; remove extra imports. See also: http://cvs.mmbase.org/viewcvs/contributions/CMSContainer_Portlets/portlets-jforum/src/java/org/jahia/jahiawebapps/jforum See also: http://www.mmbase.org/jira/browse/CMSC-907 Index: HttpServletResponseWrapper.java =================================================================== RCS file: /var/cvs/contributions/CMSContainer_Portlets/portlets-jforum/src/java/org/jahia/jahiawebapps/jforum/HttpServletResponseWrapper.java,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -u -b -r1.1 -r1.1.4.1 --- HttpServletResponseWrapper.java 17 Jan 2008 08:04:51 -0000 1.1 +++ HttpServletResponseWrapper.java 11 Feb 2009 09:08:27 -0000 1.1.4.1 @@ -1,22 +1,18 @@ package org.jahia.jahiawebapps.jforum; import java.io.IOException; -import javax.servlet.http.HttpServletResponse; + import javax.servlet.ServletOutputStream; -import java.util.StringTokenizer; -import java.util.Enumeration; -import org.jahia.portlet.util.StringUtil; -import java.net.URL; -import java.io.UnsupportedEncodingException; -import java.net.URLDecoder; -import java.util.HashMap; +import javax.servlet.http.HttpServletResponse; + import org.apache.log4j.Logger; +import org.jahia.portlet.util.StringUtil; /** * HttpServletResponseWrapper that emulates a "jforum-servlet" response from * a RenderResponse * - *...@author Khaled TLILI + * @author Khaled TLILI */ public class HttpServletResponseWrapper extends javax.servlet.http.HttpServletResponseWrapper { private String redirect = null; @@ -24,12 +20,10 @@ private static Logger logger = Logger.getLogger(HttpServletRequestWrapper.class); - - /** * Constructor for the HttpServletResponseWrapper object * - *...@param response Description of Parameter + * @param response Description of Parameter */ public HttpServletResponseWrapper(HttpServletResponse response) { super(response); @@ -41,7 +35,7 @@ /** * Gets the Redirect attribute of the HttpServletResponseWrapper object * - *...@return The Redirect value + * @return The Redirect value */ public boolean isRedirect() { return redirect != null; @@ -52,7 +46,7 @@ * Gets the EncodedRedirect attribute of the HttpServletResponseWrapper * object * - *...@return The EncodedRedirect value + * @return The EncodedRedirect value */ public String getEncodedRedirect() { return encodeURL(redirect); @@ -62,8 +56,8 @@ /** * Gets the OutputStream attribute of the HttpServletResponseWrapper object * - *...@return The OutputStream value - *...@exception IOException Description of Exception + * @return The OutputStream value + * @throws IOException Description of Exception */ public ServletOutputStream getOutputStream() throws IOException { return servletOutputStream; @@ -73,19 +67,18 @@ /** * Description of the Method * - *...@param urlValue Description of Parameter - *...@return Description of the Returned Value + * @param urlValue Description of Parameter + * @return Description of the Returned Value */ public String encodeURL(String urlValue) { return super.encodeURL(StringUtil.replaceSpecialGraphics(urlValue)); } - /** * Override send redirect * - *...@param url Description of Parameter + * @param url Description of Parameter */ public void sendRedirect(String url) { logger.debug("call redirect, new url is: " + url); @@ -97,10 +90,10 @@ * Encodes the specified URL for use in the <code>sendRedirect</code> method * or, if encoding is not needed, returns the URL unchanged. * - *...@param url the url to be encoded. - *...@return the encoded URL if encoding is needed; the unchanged URL + * @param url the url to be encoded. + * @return the encoded URL if encoding is needed; the unchanged URL * otherwise. - *...@todo Implement this javax.servlet.http.HttpServletResponse method + * @todo Implement this javax.servlet.http.HttpServletResponse method */ public String encodeRedirectURL(String url) { return url; @@ -108,10 +101,10 @@ /** - *...@param url the url to be encoded. - *...@return the encoded URL if encoding is needed; the unchanged URL + * @param url the url to be encoded. + * @return the encoded URL if encoding is needed; the unchanged URL * otherwise. - *...@todo Implement this javax.servlet.http.HttpServletResponse method + * @todo Implement this javax.servlet.http.HttpServletResponse method */ public String encodeRedirectUrl(String url) { return url; @@ -119,10 +112,10 @@ /** - *...@param url the url to be encoded. - *...@return the encoded URL if encoding is needed; the unchanged URL + * @param url the url to be encoded. + * @return the encoded URL if encoding is needed; the unchanged URL * otherwise. - *...@todo Implement this javax.servlet.http.HttpServletResponse method + * @todo Implement this javax.servlet.http.HttpServletResponse method */ public String encodeUrl(String url) { return encodeURL(url); Index: HttpServletRequestWrapper.java =================================================================== RCS file: /var/cvs/contributions/CMSContainer_Portlets/portlets-jforum/src/java/org/jahia/jahiawebapps/jforum/HttpServletRequestWrapper.java,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -u -b -r1.1 -r1.1.4.1 --- HttpServletRequestWrapper.java 17 Jan 2008 08:04:51 -0000 1.1 +++ HttpServletRequestWrapper.java 11 Feb 2009 09:08:27 -0000 1.1.4.1 @@ -1,7 +1,6 @@ package org.jahia.jahiawebapps.jforum; import javax.servlet.http.*; -import javax.servlet.http.*; import java.util.*; import net.jforum.util.preferences.SystemGlobals; _______________________________________________ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs