This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
     new c327f7be9f Remove override javadoc
c327f7be9f is described below

commit c327f7be9fb77892c4da59d318288ce5bc760a2c
Author: remm <r...@apache.org>
AuthorDate: Fri Mar 29 11:05:39 2024 +0100

    Remove override javadoc
    
    Remove very outdated boilerplate override javadoc from the Servlet API.
---
 java/org/apache/catalina/connector/Request.java  | 197 -----------------------
 java/org/apache/catalina/connector/Response.java | 152 -----------------
 2 files changed, 349 deletions(-)

diff --git a/java/org/apache/catalina/connector/Request.java 
b/java/org/apache/catalina/connector/Request.java
index d78887ce3a..f57888357f 100644
--- a/java/org/apache/catalina/connector/Request.java
+++ b/java/org/apache/catalina/connector/Request.java
@@ -831,11 +831,6 @@ public class Request implements HttpServletRequest {
 
     // ------------------------------------------------- ServletRequest Methods
 
-    /**
-     * @return the specified request attribute if it exists; otherwise, return 
<code>null</code>.
-     *
-     * @param name Name of the request attribute to return
-     */
     @SuppressWarnings("deprecation")
     @Override
     public Object getAttribute(String name) {
@@ -941,9 +936,6 @@ public class Request implements HttpServletRequest {
     }
 
 
-    /**
-     * @return the character encoding for this Request.
-     */
     @Override
     public String getCharacterEncoding() {
         String characterEncoding = coyoteRequest.getCharsetHolder().getName();
@@ -977,18 +969,12 @@ public class Request implements HttpServletRequest {
     }
 
 
-    /**
-     * @return the content length for this Request.
-     */
     @Override
     public int getContentLength() {
         return coyoteRequest.getContentLength();
     }
 
 
-    /**
-     * @return the content type for this Request.
-     */
     @Override
     public String getContentType() {
         return coyoteRequest.getContentType();
@@ -1005,13 +991,6 @@ public class Request implements HttpServletRequest {
     }
 
 
-    /**
-     * @return the servlet input stream for this Request. The default 
implementation returns a servlet input stream
-     *             created by <code>createInputStream()</code>.
-     *
-     * @exception IllegalStateException if <code>getReader()</code> has 
already been called for this request
-     * @exception IOException           if an input/output error occurs
-     */
     @Override
     public ServletInputStream getInputStream() throws IOException {
 
@@ -1028,11 +1007,6 @@ public class Request implements HttpServletRequest {
     }
 
 
-    /**
-     * @return the preferred Locale that the client will accept content in, 
based on the value for the first
-     *             <code>Accept-Language</code> header that was encountered. 
If the request did not specify a preferred
-     *             language, the server's default Locale is returned.
-     */
     @Override
     public Locale getLocale() {
 
@@ -1048,11 +1022,6 @@ public class Request implements HttpServletRequest {
     }
 
 
-    /**
-     * @return the set of preferred Locales that the client will accept 
content in, based on the values for any
-     *             <code>Accept-Language</code> headers that were encountered. 
If the request did not specify a
-     *             preferred language, the server's default Locale is returned.
-     */
     @Override
     public Enumeration<Locale> getLocales() {
 
@@ -1111,24 +1080,12 @@ public class Request implements HttpServletRequest {
     }
 
 
-    /**
-     * @return the protocol and version used to make this Request.
-     */
     @Override
     public String getProtocol() {
         return coyoteRequest.protocol().toStringType();
     }
 
 
-    /**
-     * Read the Reader wrapping the input stream for this Request. The default 
implementation wraps a
-     * <code>BufferedReader</code> around the servlet input stream returned by 
<code>createInputStream()</code>.
-     *
-     * @return a buffered reader for the request
-     *
-     * @exception IllegalStateException if <code>getInputStream()</code> has 
already been called for this request
-     * @exception IOException           if an input/output error occurs
-     */
     @Override
     public BufferedReader getReader() throws IOException {
 
@@ -1164,9 +1121,6 @@ public class Request implements HttpServletRequest {
     }
 
 
-    /**
-     * @return the remote IP address making this Request.
-     */
     @Override
     public String getRemoteAddr() {
         if (remoteAddr == null) {
@@ -1189,9 +1143,6 @@ public class Request implements HttpServletRequest {
     }
 
 
-    /**
-     * @return the remote host name making this Request.
-     */
     @Override
     public String getRemoteHost() {
         if (remoteHost == null) {
@@ -1205,9 +1156,6 @@ public class Request implements HttpServletRequest {
         return remoteHost;
     }
 
-    /**
-     * @return the Internet Protocol (IP) source port of the client or last 
proxy that sent the request.
-     */
     @Override
     public int getRemotePort() {
         if (remotePort == -1) {
@@ -1217,9 +1165,6 @@ public class Request implements HttpServletRequest {
         return remotePort;
     }
 
-    /**
-     * @return the host name of the Internet Protocol (IP) interface on which 
the request was received.
-     */
     @Override
     public String getLocalName() {
         if (localName == null) {
@@ -1229,9 +1174,6 @@ public class Request implements HttpServletRequest {
         return localName;
     }
 
-    /**
-     * @return the Internet Protocol (IP) address of the interface on which 
the request was received.
-     */
     @Override
     public String getLocalAddr() {
         if (localAddr == null) {
@@ -1242,9 +1184,6 @@ public class Request implements HttpServletRequest {
     }
 
 
-    /**
-     * @return the Internet Protocol (IP) port number of the interface on 
which the request was received.
-     */
     @Override
     public int getLocalPort() {
         if (localPort == -1) {
@@ -1254,12 +1193,6 @@ public class Request implements HttpServletRequest {
         return localPort;
     }
 
-    /**
-     * @return a RequestDispatcher that wraps the resource at the specified 
path, which may be interpreted as relative
-     *             to the current request path.
-     *
-     * @param path Path of the resource to be wrapped
-     */
     @Override
     public RequestDispatcher getRequestDispatcher(String path) {
 
@@ -1333,47 +1266,30 @@ public class Request implements HttpServletRequest {
     }
 
 
-    /**
-     * @return the scheme used to make this Request.
-     */
     @Override
     public String getScheme() {
         return coyoteRequest.scheme().toStringType();
     }
 
 
-    /**
-     * @return the server name responding to this Request.
-     */
     @Override
     public String getServerName() {
         return coyoteRequest.serverName().toString();
     }
 
 
-    /**
-     * @return the server port responding to this Request.
-     */
     @Override
     public int getServerPort() {
         return coyoteRequest.getServerPort();
     }
 
 
-    /**
-     * @return <code>true</code> if this request was received on a secure 
connection.
-     */
     @Override
     public boolean isSecure() {
         return secure;
     }
 
 
-    /**
-     * Remove the specified request attribute if it exists.
-     *
-     * @param name Name of the request attribute to remove
-     */
     @Override
     public void removeAttribute(String name) {
         // Remove the specified attribute
@@ -1393,12 +1309,6 @@ public class Request implements HttpServletRequest {
     }
 
 
-    /**
-     * Set the specified request attribute to the specified value.
-     *
-     * @param name  Name of the request attribute to set
-     * @param value The associated value
-     */
     @Override
     public void setAttribute(String name, Object value) {
 
@@ -1509,16 +1419,6 @@ public class Request implements HttpServletRequest {
     }
 
 
-    /**
-     * Overrides the name of the character encoding used in the body of this 
request. This method must be called prior
-     * to reading request parameters or reading input using 
<code>getReader()</code>.
-     *
-     * @param enc The character encoding to be used
-     *
-     * @exception UnsupportedEncodingException if the specified encoding is 
not supported
-     *
-     * @since Servlet 2.3
-     */
     @Override
     public void setCharacterEncoding(String enc) throws 
UnsupportedEncodingException {
 
@@ -1922,19 +1822,12 @@ public class Request implements HttpServletRequest {
     }
 
 
-    /**
-     * Return the authentication type used for this Request.
-     */
     @Override
     public String getAuthType() {
         return authType;
     }
 
 
-    /**
-     * Return the portion of the request URI used to select the Context of the 
Request. The value returned is not
-     * decoded which also implies it is not normalised.
-     */
     @Override
     public String getContextPath() {
         int lastSlash = mappingData.contextSlashCount;
@@ -2050,12 +1943,6 @@ public class Request implements HttpServletRequest {
     }
 
 
-    /**
-     * Return the set of Cookies received with this Request. Triggers parsing 
of the Cookie HTTP headers followed by
-     * conversion to Cookie objects if this has not already been performed.
-     *
-     * @return the array of cookies
-     */
     @Override
     public Cookie[] getCookies() {
         if (!cookiesConverted) {
@@ -2077,15 +1964,6 @@ public class Request implements HttpServletRequest {
     }
 
 
-    /**
-     * Return the value of the specified date header, if any; otherwise return 
-1.
-     *
-     * @param name Name of the requested date header
-     *
-     * @return the date as a long
-     *
-     * @exception IllegalArgumentException if the specified header value 
cannot be converted to a date
-     */
     @Override
     public long getDateHeader(String name) {
 
@@ -2104,50 +1982,24 @@ public class Request implements HttpServletRequest {
     }
 
 
-    /**
-     * Return the first value of the specified header, if any; otherwise, 
return <code>null</code>
-     *
-     * @param name Name of the requested header
-     *
-     * @return the header value
-     */
     @Override
     public String getHeader(String name) {
         return coyoteRequest.getHeader(name);
     }
 
 
-    /**
-     * Return all of the values of the specified header, if any; otherwise, 
return an empty enumeration.
-     *
-     * @param name Name of the requested header
-     *
-     * @return the enumeration with the header values
-     */
     @Override
     public Enumeration<String> getHeaders(String name) {
         return coyoteRequest.getMimeHeaders().values(name);
     }
 
 
-    /**
-     * @return the names of all headers received with this request.
-     */
     @Override
     public Enumeration<String> getHeaderNames() {
         return coyoteRequest.getMimeHeaders().names();
     }
 
 
-    /**
-     * Return the value of the specified header as an integer, or -1 if there 
is no such header for this request.
-     *
-     * @param name Name of the requested header
-     *
-     * @return the header value as an int
-     *
-     * @exception IllegalArgumentException if the specified header value 
cannot be converted to an integer
-     */
     @Override
     public int getIntHeader(String name) {
 
@@ -2166,27 +2018,18 @@ public class Request implements HttpServletRequest {
     }
 
 
-    /**
-     * @return the HTTP request method used in this Request.
-     */
     @Override
     public String getMethod() {
         return coyoteRequest.method().toStringType();
     }
 
 
-    /**
-     * @return the path information associated with this Request.
-     */
     @Override
     public String getPathInfo() {
         return mappingData.pathInfo.toStringType();
     }
 
 
-    /**
-     * @return the extra path information for this request, translated to a 
real path.
-     */
     @Override
     public String getPathTranslated() {
 
@@ -2203,18 +2046,12 @@ public class Request implements HttpServletRequest {
     }
 
 
-    /**
-     * @return the query string associated with this request.
-     */
     @Override
     public String getQueryString() {
         return coyoteRequest.queryString().toString();
     }
 
 
-    /**
-     * @return the name of the remote user that has been authenticated for 
this Request.
-     */
     @Override
     public String getRemoteUser() {
 
@@ -2236,18 +2073,12 @@ public class Request implements HttpServletRequest {
     }
 
 
-    /**
-     * @return the session identifier included in this request, if any.
-     */
     @Override
     public String getRequestedSessionId() {
         return requestedSessionId;
     }
 
 
-    /**
-     * @return the request URI for this request.
-     */
     @Override
     public String getRequestURI() {
         return coyoteRequest.requestURI().toStringType();
@@ -2260,29 +2091,18 @@ public class Request implements HttpServletRequest {
     }
 
 
-    /**
-     * @return the portion of the request URI used to select the servlet that 
will process this request.
-     */
     @Override
     public String getServletPath() {
         return mappingData.wrapperPath.toStringType();
     }
 
 
-    /**
-     * @return the session associated with this Request, creating one if 
necessary.
-     */
     @Override
     public HttpSession getSession() {
         return getSession(true);
     }
 
 
-    /**
-     * @return the session associated with this Request, creating one if 
necessary and requested.
-     *
-     * @param create Create a new session if one does not exist
-     */
     @Override
     public HttpSession getSession(boolean create) {
         Session session = doGetSession(create);
@@ -2294,9 +2114,6 @@ public class Request implements HttpServletRequest {
     }
 
 
-    /**
-     * @return <code>true</code> if the session identifier included in this 
request came from a cookie.
-     */
     @Override
     public boolean isRequestedSessionIdFromCookie() {
 
@@ -2308,9 +2125,6 @@ public class Request implements HttpServletRequest {
     }
 
 
-    /**
-     * @return <code>true</code> if the session identifier included in this 
request came from the request URI.
-     */
     @Override
     public boolean isRequestedSessionIdFromURL() {
 
@@ -2322,9 +2136,6 @@ public class Request implements HttpServletRequest {
     }
 
 
-    /**
-     * @return <code>true</code> if the session identifier included in this 
request identifies a valid session.
-     */
     @Override
     public boolean isRequestedSessionIdValid() {
 
@@ -2381,11 +2192,6 @@ public class Request implements HttpServletRequest {
     }
 
 
-    /**
-     * @return <code>true</code> if the authenticated user principal possesses 
the specified role name.
-     *
-     * @param role Role name to be validated
-     */
     @Override
     public boolean isUserInRole(String role) {
 
@@ -2430,9 +2236,6 @@ public class Request implements HttpServletRequest {
     }
 
 
-    /**
-     * @return the principal that has been authenticated for this Request.
-     */
     @Override
     public Principal getUserPrincipal() {
         if (userPrincipal instanceof TomcatPrincipal) {
diff --git a/java/org/apache/catalina/connector/Response.java 
b/java/org/apache/catalina/connector/Response.java
index e2e983b7f6..0effa36218 100644
--- a/java/org/apache/catalina/connector/Response.java
+++ b/java/org/apache/catalina/connector/Response.java
@@ -392,10 +392,6 @@ public class Response implements HttpServletResponse {
     }
 
 
-    /**
-     * @return the content type that was set or calculated for this response, 
or <code>null</code> if no content type
-     *             was set.
-     */
     @Override
     public String getContentType() {
         return getCoyoteResponse().getContentType();
@@ -428,29 +424,18 @@ public class Response implements HttpServletResponse {
     // ------------------------------------------------ ServletResponse Methods
 
 
-    /**
-     * Flush the buffer and commit this response.
-     *
-     * @exception IOException if an input/output error occurs
-     */
     @Override
     public void flushBuffer() throws IOException {
         outputBuffer.flush();
     }
 
 
-    /**
-     * @return the actual buffer size used for this Response.
-     */
     @Override
     public int getBufferSize() {
         return outputBuffer.getBufferSize();
     }
 
 
-    /**
-     * @return the character encoding used for this Response.
-     */
     @Override
     public String getCharacterEncoding() {
         String charset = getCoyoteResponse().getCharsetHolder().getName();
@@ -469,12 +454,6 @@ public class Response implements HttpServletResponse {
     }
 
 
-    /**
-     * @return the servlet output stream associated with this Response.
-     *
-     * @exception IllegalStateException if <code>getWriter</code> has already 
been called for this response
-     * @exception IOException           if an input/output error occurs
-     */
     @Override
     public ServletOutputStream getOutputStream() throws IOException {
 
@@ -491,21 +470,12 @@ public class Response implements HttpServletResponse {
     }
 
 
-    /**
-     * @return the Locale assigned to this response.
-     */
     @Override
     public Locale getLocale() {
         return getCoyoteResponse().getLocale();
     }
 
 
-    /**
-     * @return the writer associated with this Response.
-     *
-     * @exception IllegalStateException if <code>getOutputStream</code> has 
already been called for this response
-     * @exception IOException           if an input/output error occurs
-     */
     @Override
     public PrintWriter getWriter() throws IOException {
 
@@ -534,22 +504,12 @@ public class Response implements HttpServletResponse {
     }
 
 
-    /**
-     * Has the output of this response already been committed?
-     *
-     * @return <code>true</code> if the response has been committed
-     */
     @Override
     public boolean isCommitted() {
         return getCoyoteResponse().isCommitted();
     }
 
 
-    /**
-     * Clear any content written to the buffer.
-     *
-     * @exception IllegalStateException if this response has already been 
committed
-     */
     @Override
     public void reset() {
         // Ignore any call from an included servlet
@@ -565,11 +525,6 @@ public class Response implements HttpServletResponse {
     }
 
 
-    /**
-     * Reset the data buffer but not any status or header information.
-     *
-     * @exception IllegalStateException if the response has already been 
committed
-     */
     @Override
     public void resetBuffer() {
         resetBuffer(false);
@@ -602,13 +557,6 @@ public class Response implements HttpServletResponse {
     }
 
 
-    /**
-     * Set the buffer size to be used for this Response.
-     *
-     * @param size The new buffer size
-     *
-     * @exception IllegalStateException if this method is called after output 
has been committed for this response
-     */
     @Override
     public void setBufferSize(int size) {
 
@@ -621,11 +569,6 @@ public class Response implements HttpServletResponse {
     }
 
 
-    /**
-     * Set the content length (in bytes) for this Response.
-     *
-     * @param length The new content length
-     */
     @Override
     public void setContentLength(int length) {
 
@@ -648,11 +591,6 @@ public class Response implements HttpServletResponse {
     }
 
 
-    /**
-     * Set the content type for this Response.
-     *
-     * @param type The new content type
-     */
     @Override
     public void setContentType(String type) {
 
@@ -706,12 +644,6 @@ public class Response implements HttpServletResponse {
     }
 
 
-    /**
-     * Overrides the name of the character encoding used in the body of the 
request. This method must be called prior to
-     * reading request parameters or reading input using getReader().
-     *
-     * @param encoding String containing the name of the character encoding.
-     */
     @Override
     public void setCharacterEncoding(String encoding) {
 
@@ -772,11 +704,6 @@ public class Response implements HttpServletResponse {
     }
 
 
-    /**
-     * Set the Locale that is appropriate for this response, including setting 
the appropriate character encoding.
-     *
-     * @param locale The new locale
-     */
     @Override
     public void setLocale(Locale locale) {
 
@@ -928,12 +855,6 @@ public class Response implements HttpServletResponse {
     }
 
 
-    /**
-     * Add the specified date header to the specified value.
-     *
-     * @param name  Name of the header to set
-     * @param value Date value to be set
-     */
     @Override
     public void addDateHeader(String name, long value) {
 
@@ -954,12 +875,6 @@ public class Response implements HttpServletResponse {
     }
 
 
-    /**
-     * Add the specified header to the specified value.
-     *
-     * @param name  Name of the header to set
-     * @param value Value to be set
-     */
     @Override
     public void addHeader(String name, String value) {
         addHeader(name, value, null);
@@ -1008,12 +923,6 @@ public class Response implements HttpServletResponse {
     }
 
 
-    /**
-     * Add the specified integer header to the specified value.
-     *
-     * @param name  Name of the header to set
-     * @param value Integer value to be set
-     */
     @Override
     public void addIntHeader(String name, int value) {
 
@@ -1035,13 +944,6 @@ public class Response implements HttpServletResponse {
     }
 
 
-    /**
-     * Has the specified header been set already in this response?
-     *
-     * @param name Name of the header to check
-     *
-     * @return <code>true</code> if the header has been set
-     */
     @Override
     public boolean containsHeader(String name) {
         // Need special handling for Content-Type and Content-Length due to
@@ -1074,13 +976,6 @@ public class Response implements HttpServletResponse {
     }
 
 
-    /**
-     * Encode the session identifier associated with this response into the 
specified redirect URL, if necessary.
-     *
-     * @param url URL to be encoded
-     *
-     * @return <code>true</code> if the URL was encoded
-     */
     @Override
     public String encodeRedirectURL(String url) {
         if (isEncodeable(toAbsolute(url))) {
@@ -1091,13 +986,6 @@ public class Response implements HttpServletResponse {
     }
 
 
-    /**
-     * Encode the session identifier associated with this response into the 
specified URL, if necessary.
-     *
-     * @param url URL to be encoded
-     *
-     * @return <code>true</code> if the URL was encoded
-     */
     @Override
     public String encodeURL(String url) {
 
@@ -1147,29 +1035,12 @@ public class Response implements HttpServletResponse {
     }
 
 
-    /**
-     * Send an error response with the specified status and a default message.
-     *
-     * @param status HTTP status code to send
-     *
-     * @exception IllegalStateException if this response has already been 
committed
-     * @exception IOException           if an input/output error occurs
-     */
     @Override
     public void sendError(int status) throws IOException {
         sendError(status, null);
     }
 
 
-    /**
-     * Send an error response with the specified status and message.
-     *
-     * @param status  HTTP status code to send
-     * @param message Corresponding message to send
-     *
-     * @exception IllegalStateException if this response has already been 
committed
-     * @exception IOException           if an input/output error occurs
-     */
     @Override
     public void sendError(int status, String message) throws IOException {
 
@@ -1242,12 +1113,6 @@ public class Response implements HttpServletResponse {
     }
 
 
-    /**
-     * Set the specified date header to the specified value.
-     *
-     * @param name  Name of the header to set
-     * @param value Date value to be set
-     */
     @Override
     public void setDateHeader(String name, long value) {
 
@@ -1268,12 +1133,6 @@ public class Response implements HttpServletResponse {
     }
 
 
-    /**
-     * Set the specified header to the specified value.
-     *
-     * @param name  Name of the header to set
-     * @param value Value to be set
-     */
     @Override
     public void setHeader(String name, String value) {
 
@@ -1301,12 +1160,6 @@ public class Response implements HttpServletResponse {
     }
 
 
-    /**
-     * Set the specified integer header to the specified value.
-     *
-     * @param name  Name of the header to set
-     * @param value Integer value to be set
-     */
     @Override
     public void setIntHeader(String name, int value) {
 
@@ -1328,11 +1181,6 @@ public class Response implements HttpServletResponse {
     }
 
 
-    /**
-     * Set the HTTP status to be returned with this response.
-     *
-     * @param status The new HTTP status
-     */
     @Override
     public void setStatus(int status) {
 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to