This is an automated email from the ASF dual-hosted git repository.
remm pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new bd2e5cec01 Remove override javadoc
bd2e5cec01 is described below
commit bd2e5cec0115a6dc526d1646974eb394a22326c6
Author: remm <[email protected]>
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 | 209 -----------------------
java/org/apache/catalina/connector/Response.java | 161 -----------------
2 files changed, 370 deletions(-)
diff --git a/java/org/apache/catalina/connector/Request.java
b/java/org/apache/catalina/connector/Request.java
index e429bd00cf..13761b976e 100644
--- a/java/org/apache/catalina/connector/Request.java
+++ b/java/org/apache/catalina/connector/Request.java
@@ -859,11 +859,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
- */
@Override
public Object getAttribute(String name) {
// Special attributes
@@ -967,9 +962,6 @@ public class Request implements HttpServletRequest {
}
- /**
- * @return the character encoding for this Request.
- */
@Override
public String getCharacterEncoding() {
String characterEncoding = coyoteRequest.getCharacterEncoding();
@@ -1013,18 +1005,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();
@@ -1041,13 +1027,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 {
@@ -1064,11 +1043,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() {
@@ -1084,11 +1058,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() {
@@ -1183,24 +1152,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 {
@@ -1236,13 +1193,6 @@ public class Request implements HttpServletRequest {
}
- /**
- * @return the real path of the specified virtual path.
- *
- * @param path Path to be translated
- *
- * @deprecated As of version 2.1 of the Java Servlet API, use
<code>ServletContext.getRealPath()</code>.
- */
@Override
@Deprecated
public String getRealPath(String path) {
@@ -1264,9 +1214,6 @@ public class Request implements HttpServletRequest {
}
- /**
- * @return the remote IP address making this Request.
- */
@Override
public String getRemoteAddr() {
if (remoteAddr == null) {
@@ -1289,9 +1236,6 @@ public class Request implements HttpServletRequest {
}
- /**
- * @return the remote host name making this Request.
- */
@Override
public String getRemoteHost() {
if (remoteHost == null) {
@@ -1305,9 +1249,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) {
@@ -1317,9 +1258,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) {
@@ -1329,9 +1267,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) {
@@ -1342,9 +1277,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) {
@@ -1354,12 +1286,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) {
@@ -1433,47 +1359,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
@@ -1493,12 +1402,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) {
@@ -1627,16 +1530,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 {
@@ -2053,19 +1946,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;
@@ -2181,12 +2067,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) {
@@ -2208,15 +2088,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) {
@@ -2235,50 +2106,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) {
@@ -2297,27 +2142,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() {
@@ -2334,18 +2170,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() {
@@ -2367,18 +2197,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();
@@ -2391,29 +2215,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);
@@ -2425,9 +2238,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() {
@@ -2439,9 +2249,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() {
@@ -2453,11 +2260,6 @@ public class Request implements HttpServletRequest {
}
- /**
- * @return <code>true</code> if the session identifier included in this
request came from the request URI.
- *
- * @deprecated As of Version 2.1 of the Java Servlet API, use
<code>isRequestedSessionIdFromURL()</code> instead.
- */
@Override
@Deprecated
public boolean isRequestedSessionIdFromUrl() {
@@ -2465,9 +2267,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() {
@@ -2524,11 +2323,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) {
@@ -2573,9 +2367,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 5fd3a6df52..06b0e4fad7 100644
--- a/java/org/apache/catalina/connector/Response.java
+++ b/java/org/apache/catalina/connector/Response.java
@@ -448,10 +448,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();
@@ -484,29 +480,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().getCharacterEncoding();
@@ -528,12 +513,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 {
@@ -550,21 +529,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 {
@@ -593,22 +563,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
@@ -624,11 +584,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);
@@ -661,13 +616,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) {
@@ -680,11 +628,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) {
@@ -707,11 +650,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) {
@@ -768,12 +706,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) {
@@ -806,11 +738,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) {
@@ -975,12 +902,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) {
@@ -1001,12 +922,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);
@@ -1055,12 +970,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) {
@@ -1082,13 +991,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
@@ -1121,13 +1023,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))) {
@@ -1138,15 +1033,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
- *
- * @deprecated As of Version 2.1 of the Java Servlet API, use
<code>encodeRedirectURL()</code> instead.
- */
@Override
@Deprecated
public String encodeRedirectUrl(String url) {
@@ -1154,13 +1040,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) {
@@ -1239,29 +1118,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 {
@@ -1346,12 +1208,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) {
@@ -1372,12 +1228,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) {
@@ -1405,12 +1255,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) {
@@ -1432,11 +1276,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) {
setStatus(status, null);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]