diff --git a/src/main/java/javax/servlet/GenericServlet.java b/src/main/java/javax/servlet/GenericServlet.java index 4a51a5bf0..27e3da268 100644 --- a/src/main/java/javax/servlet/GenericServlet.java +++ b/src/main/java/javax/servlet/GenericServlet.java @@ -72,6 +72,7 @@ public GenericServlet() { } * * */ + @Override public void destroy() { } @@ -92,6 +93,7 @@ public void destroy() { * of the initialization parameter * */ + @Override public String getInitParameter(String name) { ServletConfig sc = getServletConfig(); if (sc == null) { @@ -118,6 +120,7 @@ public String getInitParameter(String name) { * objects containing the names of * the servlet's initialization parameters */ + @Override public Enumeration getInitParameterNames() { ServletConfig sc = getServletConfig(); if (sc == null) { @@ -135,6 +138,7 @@ public Enumeration getInitParameterNames() { * @return ServletConfig the ServletConfig object * that initialized this servlet */ + @Override public ServletConfig getServletConfig() { return config; } @@ -152,6 +156,7 @@ public ServletConfig getServletConfig() { * passed to this servlet by the init * method */ + @Override public ServletContext getServletContext() { ServletConfig sc = getServletConfig(); if (sc == null) { @@ -174,6 +179,7 @@ public ServletContext getServletContext() { * @return String information about this servlet, by default an * empty string */ + @Override public String getServletInfo() { return ""; } @@ -198,6 +204,7 @@ public String getServletInfo() { * * @see UnavailableException */ + @Override public void init(ServletConfig config) throws ServletException { this.config = config; this.init(); @@ -274,6 +281,7 @@ public void log(String message, Throwable t) { * exception occurs */ + @Override public abstract void service(ServletRequest req, ServletResponse res) throws ServletException, IOException; @@ -284,6 +292,7 @@ public abstract void service(ServletRequest req, ServletResponse res) * * @return the name of this servlet instance */ + @Override public String getServletName() { ServletConfig sc = getServletConfig(); if (sc == null) { diff --git a/src/main/java/javax/servlet/ServletRequestWrapper.java b/src/main/java/javax/servlet/ServletRequestWrapper.java index 17b5f508f..5ff456e0c 100644 --- a/src/main/java/javax/servlet/ServletRequestWrapper.java +++ b/src/main/java/javax/servlet/ServletRequestWrapper.java @@ -84,6 +84,7 @@ public void setRequest(ServletRequest request) { * The default behavior of this method is to call getAttribute(String name) * on the wrapped request object. */ + @Override public Object getAttribute(String name) { return this.request.getAttribute(name); } @@ -93,6 +94,7 @@ public Object getAttribute(String name) { * The default behavior of this method is to return getAttributeNames() * on the wrapped request object. */ + @Override public Enumeration getAttributeNames() { return this.request.getAttributeNames(); } @@ -102,6 +104,7 @@ public Enumeration getAttributeNames() { * The default behavior of this method is to return getCharacterEncoding() * on the wrapped request object. */ + @Override public String getCharacterEncoding() { return this.request.getCharacterEncoding(); } @@ -111,6 +114,7 @@ public String getCharacterEncoding() { * The default behavior of this method is to set the character encoding * on the wrapped request object. */ + @Override public void setCharacterEncoding(String enc) throws UnsupportedEncodingException { this.request.setCharacterEncoding(enc); @@ -121,6 +125,7 @@ public void setCharacterEncoding(String enc) * The default behavior of this method is to return getContentLength() * on the wrapped request object. */ + @Override public int getContentLength() { return this.request.getContentLength(); } @@ -131,6 +136,7 @@ public int getContentLength() { * * @since Servlet 3.1 */ + @Override public long getContentLengthLong() { return this.request.getContentLengthLong(); } @@ -140,6 +146,7 @@ public long getContentLengthLong() { * The default behavior of this method is to return getContentType() * on the wrapped request object. */ + @Override public String getContentType() { return this.request.getContentType(); } @@ -149,6 +156,7 @@ public String getContentType() { * The default behavior of this method is to return getInputStream() * on the wrapped request object. */ + @Override public ServletInputStream getInputStream() throws IOException { return this.request.getInputStream(); } @@ -158,6 +166,7 @@ public ServletInputStream getInputStream() throws IOException { * The default behavior of this method is to return * getParameter(String name) on the wrapped request object. */ + @Override public String getParameter(String name) { return this.request.getParameter(name); } @@ -167,6 +176,7 @@ public String getParameter(String name) { * The default behavior of this method is to return getParameterMap() * on the wrapped request object. */ + @Override public Map getParameterMap() { return this.request.getParameterMap(); } @@ -176,6 +186,7 @@ public Map getParameterMap() { * The default behavior of this method is to return getParameterNames() * on the wrapped request object. */ + @Override public Enumeration getParameterNames() { return this.request.getParameterNames(); } @@ -185,6 +196,7 @@ public Enumeration getParameterNames() { * The default behavior of this method is to return * getParameterValues(String name) on the wrapped request object. */ + @Override public String[] getParameterValues(String name) { return this.request.getParameterValues(name); } @@ -194,6 +206,7 @@ public String[] getParameterValues(String name) { * The default behavior of this method is to return getProtocol() * on the wrapped request object. */ + @Override public String getProtocol() { return this.request.getProtocol(); } @@ -203,6 +216,7 @@ public String getProtocol() { * The default behavior of this method is to return getScheme() * on the wrapped request object. */ + @Override public String getScheme() { return this.request.getScheme(); } @@ -212,6 +226,7 @@ public String getScheme() { * The default behavior of this method is to return getServerName() * on the wrapped request object. */ + @Override public String getServerName() { return this.request.getServerName(); } @@ -221,6 +236,7 @@ public String getServerName() { * The default behavior of this method is to return getServerPort() * on the wrapped request object. */ + @Override public int getServerPort() { return this.request.getServerPort(); } @@ -230,6 +246,7 @@ public int getServerPort() { * The default behavior of this method is to return getReader() * on the wrapped request object. */ + @Override public BufferedReader getReader() throws IOException { return this.request.getReader(); } @@ -239,6 +256,7 @@ public BufferedReader getReader() throws IOException { * The default behavior of this method is to return getRemoteAddr() * on the wrapped request object. */ + @Override public String getRemoteAddr() { return this.request.getRemoteAddr(); } @@ -248,6 +266,7 @@ public String getRemoteAddr() { * The default behavior of this method is to return getRemoteHost() * on the wrapped request object. */ + @Override public String getRemoteHost() { return this.request.getRemoteHost(); } @@ -257,6 +276,7 @@ public String getRemoteHost() { * The default behavior of this method is to return * setAttribute(String name, Object o) on the wrapped request object. */ + @Override public void setAttribute(String name, Object o) { this.request.setAttribute(name, o); } @@ -266,6 +286,7 @@ public void setAttribute(String name, Object o) { * The default behavior of this method is to call * removeAttribute(String name) on the wrapped request object. */ + @Override public void removeAttribute(String name) { this.request.removeAttribute(name); } @@ -275,6 +296,7 @@ public void removeAttribute(String name) { * The default behavior of this method is to return getLocale() * on the wrapped request object. */ + @Override public Locale getLocale() { return this.request.getLocale(); } @@ -284,6 +306,7 @@ public Locale getLocale() { * The default behavior of this method is to return getLocales() * on the wrapped request object. */ + @Override public Enumeration getLocales() { return this.request.getLocales(); } @@ -293,6 +316,7 @@ public Enumeration getLocales() { * The default behavior of this method is to return isSecure() * on the wrapped request object. */ + @Override public boolean isSecure() { return this.request.isSecure(); } @@ -302,6 +326,7 @@ public boolean isSecure() { * The default behavior of this method is to return * getRequestDispatcher(String path) on the wrapped request object. */ + @Override public RequestDispatcher getRequestDispatcher(String path) { return this.request.getRequestDispatcher(path); } @@ -314,6 +339,7 @@ public RequestDispatcher getRequestDispatcher(String path) { * @deprecated As of Version 2.1 of the Java Servlet API, * use {@link ServletContext#getRealPath} instead */ + @Override @Deprecated public String getRealPath(String path) { return this.request.getRealPath(path); @@ -326,6 +352,7 @@ public String getRealPath(String path) { * * @since Servlet 2.4 */ + @Override public int getRemotePort(){ return this.request.getRemotePort(); } @@ -337,6 +364,7 @@ public int getRemotePort(){ * * @since Servlet 2.4 */ + @Override public String getLocalName(){ return this.request.getLocalName(); } @@ -348,6 +376,7 @@ public String getLocalName(){ * * @since Servlet 2.4 */ + @Override public String getLocalAddr(){ return this.request.getLocalAddr(); } @@ -359,6 +388,7 @@ public String getLocalAddr(){ * * @since Servlet 2.4 */ + @Override public int getLocalPort(){ return this.request.getLocalPort(); } @@ -373,6 +403,7 @@ public int getLocalPort(){ * * @since Servlet 3.0 */ + @Override public ServletContext getServletContext() { return request.getServletContext(); } @@ -397,6 +428,7 @@ public ServletContext getServletContext() { * * @since Servlet 3.0 */ + @Override public AsyncContext startAsync() throws IllegalStateException { return request.startAsync(); } @@ -427,6 +459,7 @@ public AsyncContext startAsync() throws IllegalStateException { * * @since Servlet 3.0 */ + @Override public AsyncContext startAsync(ServletRequest servletRequest, ServletResponse servletResponse) throws IllegalStateException { @@ -444,6 +477,7 @@ public AsyncContext startAsync(ServletRequest servletRequest, * * @since Servlet 3.0 */ + @Override public boolean isAsyncStarted() { return request.isAsyncStarted(); } @@ -459,6 +493,7 @@ public boolean isAsyncStarted() { * * @since Servlet 3.0 */ + @Override public boolean isAsyncSupported() { return request.isAsyncSupported(); } @@ -483,6 +518,7 @@ public boolean isAsyncSupported() { * * @since Servlet 3.0 */ + @Override public AsyncContext getAsyncContext() { return request.getAsyncContext(); } @@ -550,6 +586,7 @@ public boolean isWrapperFor(Class wrappedType) { * * @since Servlet 3.0 */ + @Override public DispatcherType getDispatcherType() { return request.getDispatcherType(); } diff --git a/src/main/java/javax/servlet/ServletResponseWrapper.java b/src/main/java/javax/servlet/ServletResponseWrapper.java index 38761906e..8f5cdae1a 100644 --- a/src/main/java/javax/servlet/ServletResponseWrapper.java +++ b/src/main/java/javax/servlet/ServletResponseWrapper.java @@ -83,6 +83,7 @@ public void setResponse(ServletResponse response) { * @since Servlet 2.4 */ + @Override public void setCharacterEncoding(String charset) { this.response.setCharacterEncoding(charset); } @@ -92,6 +93,7 @@ public void setCharacterEncoding(String charset) { * on the wrapped response object. */ + @Override public String getCharacterEncoding() { return this.response.getCharacterEncoding(); } @@ -102,6 +104,7 @@ public String getCharacterEncoding() { * on the wrapped response object. */ + @Override public ServletOutputStream getOutputStream() throws IOException { return this.response.getOutputStream(); } @@ -112,6 +115,7 @@ public ServletOutputStream getOutputStream() throws IOException { */ + @Override public PrintWriter getWriter() throws IOException { return this.response.getWriter(); } @@ -121,6 +125,7 @@ public PrintWriter getWriter() throws IOException { * on the wrapped response object. */ + @Override public void setContentLength(int len) { this.response.setContentLength(len); } @@ -130,6 +135,7 @@ public void setContentLength(int len) { * on the wrapped response object. */ + @Override public void setContentLengthLong(long len) { this.response.setContentLengthLong(len); } @@ -139,6 +145,7 @@ public void setContentLengthLong(long len) { * on the wrapped response object. */ + @Override public void setContentType(String type) { this.response.setContentType(type); } @@ -150,6 +157,7 @@ public void setContentType(String type) { * @since Servlet 2.4 */ + @Override public String getContentType() { return this.response.getContentType(); } @@ -158,6 +166,7 @@ public String getContentType() { * The default behavior of this method is to call setBufferSize(int size) * on the wrapped response object. */ + @Override public void setBufferSize(int size) { this.response.setBufferSize(size); } @@ -166,6 +175,7 @@ public void setBufferSize(int size) { * The default behavior of this method is to return getBufferSize() * on the wrapped response object. */ + @Override public int getBufferSize() { return this.response.getBufferSize(); } @@ -175,6 +185,7 @@ public int getBufferSize() { * on the wrapped response object. */ + @Override public void flushBuffer() throws IOException { this.response.flushBuffer(); } @@ -183,6 +194,7 @@ public void flushBuffer() throws IOException { * The default behavior of this method is to return isCommitted() * on the wrapped response object. */ + @Override public boolean isCommitted() { return this.response.isCommitted(); } @@ -192,6 +204,7 @@ public boolean isCommitted() { * on the wrapped response object. */ + @Override public void reset() { this.response.reset(); } @@ -201,6 +214,7 @@ public void reset() { * on the wrapped response object. */ + @Override public void resetBuffer() { this.response.resetBuffer(); } @@ -210,6 +224,7 @@ public void resetBuffer() { * on the wrapped response object. */ + @Override public void setLocale(Locale loc) { this.response.setLocale(loc); } @@ -218,6 +233,7 @@ public void setLocale(Locale loc) { * The default behavior of this method is to return getLocale() * on the wrapped response object. */ + @Override public Locale getLocale() { return this.response.getLocale(); } diff --git a/src/main/java/javax/servlet/http/Cookie.java b/src/main/java/javax/servlet/http/Cookie.java index cfd858290..3dd533ab3 100644 --- a/src/main/java/javax/servlet/http/Cookie.java +++ b/src/main/java/javax/servlet/http/Cookie.java @@ -422,6 +422,7 @@ private boolean isToken(String value) { * Overrides the standard java.lang.Object.clone * method to return a copy of this Cookie. */ + @Override public Object clone() { try { return super.clone(); diff --git a/src/main/java/javax/servlet/http/HttpServlet.java b/src/main/java/javax/servlet/http/HttpServlet.java index 46f16f08d..099a54ecc 100644 --- a/src/main/java/javax/servlet/http/HttpServlet.java +++ b/src/main/java/javax/servlet/http/HttpServlet.java @@ -907,10 +907,12 @@ public void write(byte buf[], int offset, int len) } + @Override public boolean isReady() { return false; } + @Override public void setWriteListener(WriteListener writeListener) { }