Author: markt Date: Sun Feb 7 21:12:03 2010 New Revision: 907493 URL: http://svn.apache.org/viewvc?rev=907493&view=rev Log: Get javax.servlet.http passing TCK API check Removing use of @Deprecated Use better comment for this in java.servlet
Modified: tomcat/trunk/java/javax/servlet/ServletContext.java tomcat/trunk/java/javax/servlet/ServletRequest.java tomcat/trunk/java/javax/servlet/ServletRequestWrapper.java tomcat/trunk/java/javax/servlet/SingleThreadModel.java tomcat/trunk/java/javax/servlet/UnavailableException.java tomcat/trunk/java/javax/servlet/http/HttpServletRequest.java tomcat/trunk/java/javax/servlet/http/HttpServletRequestWrapper.java tomcat/trunk/java/javax/servlet/http/HttpServletResponse.java tomcat/trunk/java/javax/servlet/http/HttpServletResponseWrapper.java tomcat/trunk/java/javax/servlet/http/HttpSession.java tomcat/trunk/java/javax/servlet/http/HttpSessionContext.java tomcat/trunk/java/javax/servlet/http/HttpUtils.java Modified: tomcat/trunk/java/javax/servlet/ServletContext.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/ServletContext.java?rev=907493&r1=907492&r2=907493&view=diff ============================================================================== --- tomcat/trunk/java/javax/servlet/ServletContext.java (original) +++ tomcat/trunk/java/javax/servlet/ServletContext.java Sun Feb 7 21:12:03 2010 @@ -356,7 +356,7 @@ * * @deprecated */ - @SuppressWarnings("dep-ann") // Spec API does not use dep-ann + @SuppressWarnings("dep-ann") // Spec API does not use @Deprecated public Servlet getServlet(String name) throws ServletException; @@ -377,7 +377,7 @@ * * @deprecated */ - @SuppressWarnings("dep-ann") // Spec API does not use dep-ann + @SuppressWarnings("dep-ann") // Spec API does not use @Deprecated public Enumeration<Servlet> getServlets(); @@ -397,7 +397,7 @@ * * @deprecated */ - @SuppressWarnings("dep-ann") // Spec API does not use dep-ann + @SuppressWarnings("dep-ann") // Spec API does not use @Deprecated public Enumeration<String> getServletNames(); @@ -433,7 +433,7 @@ * * @deprecated */ - @SuppressWarnings("dep-ann") // Spec API does not use dep-ann + @SuppressWarnings("dep-ann") // Spec API does not use @Deprecated public void log(Exception exception, String msg); Modified: tomcat/trunk/java/javax/servlet/ServletRequest.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/ServletRequest.java?rev=907493&r1=907492&r2=907493&view=diff ============================================================================== --- tomcat/trunk/java/javax/servlet/ServletRequest.java (original) +++ tomcat/trunk/java/javax/servlet/ServletRequest.java Sun Feb 7 21:12:03 2010 @@ -543,7 +543,7 @@ * @deprecated As of Version 2.1 of the Java Servlet API, * use {...@link ServletContext#getRealPath} instead. */ - @SuppressWarnings("dep-ann") // Spec API does not use dep-ann + @SuppressWarnings("dep-ann") // Spec API does not use @Deprecated public String getRealPath(String path); Modified: tomcat/trunk/java/javax/servlet/ServletRequestWrapper.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/ServletRequestWrapper.java?rev=907493&r1=907492&r2=907493&view=diff ============================================================================== --- tomcat/trunk/java/javax/servlet/ServletRequestWrapper.java (original) +++ tomcat/trunk/java/javax/servlet/ServletRequestWrapper.java Sun Feb 7 21:12:03 2010 @@ -351,7 +351,7 @@ * on the wrapped request object. * @deprecated As of Version 3.0 of the Java Servlet API */ - @SuppressWarnings("dep-ann") // Spec API does not use dep-ann + @SuppressWarnings("dep-ann") // Spec API does not use @Deprecated public String getRealPath(String path) { return this.request.getRealPath(path); } Modified: tomcat/trunk/java/javax/servlet/SingleThreadModel.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/SingleThreadModel.java?rev=907493&r1=907492&r2=907493&view=diff ============================================================================== --- tomcat/trunk/java/javax/servlet/SingleThreadModel.java (original) +++ tomcat/trunk/java/javax/servlet/SingleThreadModel.java Sun Feb 7 21:12:03 2010 @@ -44,7 +44,7 @@ * @deprecated As of Java Servlet API 2.4, with no direct * replacement. */ -...@suppresswarnings("dep-ann") // Spec API does not use dep-ann +...@suppresswarnings("dep-ann") // Spec API does not use @Deprecated public interface SingleThreadModel { // No methods } Modified: tomcat/trunk/java/javax/servlet/UnavailableException.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/UnavailableException.java?rev=907493&r1=907492&r2=907493&view=diff ============================================================================== --- tomcat/trunk/java/javax/servlet/UnavailableException.java (original) +++ tomcat/trunk/java/javax/servlet/UnavailableException.java Sun Feb 7 21:12:03 2010 @@ -65,7 +65,7 @@ * @deprecated As of Java Servlet API 2.2, use {...@link * #UnavailableException(String)} instead. */ - @SuppressWarnings("dep-ann") // Spec API does not use dep-ann + @SuppressWarnings("dep-ann") // Spec API does not use @Deprecated public UnavailableException(Servlet servlet, String msg) { super(msg); this.servlet = servlet; @@ -88,7 +88,7 @@ * @deprecated As of Java Servlet API 2.2, use {...@link * #UnavailableException(String, int)} instead. */ - @SuppressWarnings("dep-ann") // Spec API does not use dep-ann + @SuppressWarnings("dep-ann") // Spec API does not use @Deprecated public UnavailableException(int seconds, Servlet servlet, String msg) { super(msg); this.servlet = servlet; @@ -175,7 +175,7 @@ * * @deprecated As of Java Servlet API 2.2, with no replacement. */ - @SuppressWarnings("dep-ann") // Spec API does not use dep-ann + @SuppressWarnings("dep-ann") // Spec API does not use @Deprecated public Servlet getServlet() { return servlet; } Modified: tomcat/trunk/java/javax/servlet/http/HttpServletRequest.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/http/HttpServletRequest.java?rev=907493&r1=907492&r2=907493&view=diff ============================================================================== --- tomcat/trunk/java/javax/servlet/http/HttpServletRequest.java (original) +++ tomcat/trunk/java/javax/servlet/http/HttpServletRequest.java Sun Feb 7 21:12:03 2010 @@ -657,8 +657,7 @@ * instead. * */ - - @Deprecated + @SuppressWarnings("dep-ann") // Spec API does not use @Deprecated public boolean isRequestedSessionIdFromUrl(); Modified: tomcat/trunk/java/javax/servlet/http/HttpServletRequestWrapper.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/http/HttpServletRequestWrapper.java?rev=907493&r1=907492&r2=907493&view=diff ============================================================================== --- tomcat/trunk/java/javax/servlet/http/HttpServletRequestWrapper.java (original) +++ tomcat/trunk/java/javax/servlet/http/HttpServletRequestWrapper.java Sun Feb 7 21:12:03 2010 @@ -259,7 +259,7 @@ * on the wrapped request object. * @deprecated As of Version 3.0 of the Java Servlet API */ - @Deprecated + @SuppressWarnings("dep-ann") // Spec API does not use @Deprecated public boolean isRequestedSessionIdFromUrl() { return this._getHttpServletRequest().isRequestedSessionIdFromUrl(); } Modified: tomcat/trunk/java/javax/servlet/http/HttpServletResponse.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/http/HttpServletResponse.java?rev=907493&r1=907492&r2=907493&view=diff ============================================================================== --- tomcat/trunk/java/javax/servlet/http/HttpServletResponse.java (original) +++ tomcat/trunk/java/javax/servlet/http/HttpServletResponse.java Sun Feb 7 21:12:03 2010 @@ -111,26 +111,24 @@ public String encodeRedirectURL(String url); /** - * @deprecated As of version 2.1, use encodeURL(String url) instead - * * @param url the url to be encoded. * @return the encoded URL if encoding is needed; * the unchanged URL otherwise. + * + * @deprecated As of version 2.1, use encodeURL(String url) instead */ - - @Deprecated + @SuppressWarnings("dep-ann") // Spec API does not use @Deprecated public String encodeUrl(String url); /** - * @deprecated As of version 2.1, use - * encodeRedirectURL(String url) instead - * * @param url the url to be encoded. * @return the encoded URL if encoding is needed; * the unchanged URL otherwise. + * + * @deprecated As of version 2.1, use + * encodeRedirectURL(String url) instead */ - - @Deprecated + @SuppressWarnings("dep-ann") // Spec API does not use @Deprecated public String encodeRedirectUrl(String url); /** @@ -311,18 +309,17 @@ public void setStatus(int sc); /** - * @deprecated As of version 2.1, due to ambiguous meaning of the - * message parameter. To set a status code - * use <code>setStatus(int)</code>, to send an error with a description - * use <code>sendError(int, String)</code>. - * * Sets the status code and message for this response. * * @param sc the status code * @param sm the status message + * + * @deprecated As of version 2.1, due to ambiguous meaning of the + * message parameter. To set a status code + * use <code>setStatus(int)</code>, to send an error with a description + * use <code>sendError(int, String)</code>. */ - - @Deprecated + @SuppressWarnings("dep-ann") // Spec API does not use @Deprecated public void setStatus(int sc, String sm); Modified: tomcat/trunk/java/javax/servlet/http/HttpServletResponseWrapper.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/http/HttpServletResponseWrapper.java?rev=907493&r1=907492&r2=907493&view=diff ============================================================================== --- tomcat/trunk/java/javax/servlet/http/HttpServletResponseWrapper.java (original) +++ tomcat/trunk/java/javax/servlet/http/HttpServletResponseWrapper.java Sun Feb 7 21:12:03 2010 @@ -90,7 +90,7 @@ * on the wrapped response object. * @deprecated As of Version 3.0 of the Java Servlet API */ - @Deprecated + @SuppressWarnings("dep-ann") // Spec API does not use @Deprecated public String encodeUrl(String url) { return this._getHttpServletResponse().encodeUrl(url); } @@ -100,7 +100,7 @@ * on the wrapped response object. * @deprecated As of Version 3.0 of the Java Servlet API */ - @Deprecated + @SuppressWarnings("dep-ann") // Spec API does not use @Deprecated public String encodeRedirectUrl(String url) { return this._getHttpServletResponse().encodeRedirectUrl(url); } @@ -194,7 +194,7 @@ * on the wrapped response object. * @deprecated As of Version 3.0 of the Java Servlet API */ - @Deprecated + @SuppressWarnings("dep-ann") // Spec API does not use @Deprecated public void setStatus(int sc, String sm) { this._getHttpServletResponse().setStatus(sc, sm); } Modified: tomcat/trunk/java/javax/servlet/http/HttpSession.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/http/HttpSession.java?rev=907493&r1=907492&r2=907493&view=diff ============================================================================== --- tomcat/trunk/java/javax/servlet/http/HttpSession.java (original) +++ tomcat/trunk/java/javax/servlet/http/HttpSession.java Sun Feb 7 21:12:03 2010 @@ -198,8 +198,7 @@ * version of the Java Servlet API. * */ - - @Deprecated + @SuppressWarnings("dep-ann") // Spec API does not use @Deprecated public HttpSessionContext getSessionContext(); @@ -225,10 +224,6 @@ /** - * - * @deprecated As of Version 2.2, this method is - * replaced by {...@link #getAttribute}. - * * @param name a string specifying the name of the object * * @return the object with the specified name @@ -236,9 +231,10 @@ * @exception IllegalStateException if this method is called on an * invalidated session * + * @deprecated As of Version 2.2, this method is + * replaced by {...@link #getAttribute}. */ - - @Deprecated + @SuppressWarnings("dep-ann") // Spec API does not use @Deprecated public Object getValue(String name); @@ -265,10 +261,6 @@ /** - * - * @deprecated As of Version 2.2, this method is - * replaced by {...@link #getAttributeNames} - * * @return an array of <code>String</code> * objects specifying the * names of all the objects bound to @@ -277,9 +269,10 @@ * @exception IllegalStateException if this method is called on an * invalidated session * + * @deprecated As of Version 2.2, this method is + * replaced by {...@link #getAttributeNames} */ - - @Deprecated + @SuppressWarnings("dep-ann") // Spec API does not use @Deprecated public String[] getValueNames(); @@ -322,10 +315,6 @@ /** - * - * @deprecated As of Version 2.2, this method is - * replaced by {...@link #setAttribute} - * * @param name the name to which the object is bound; * cannot be null * @@ -334,9 +323,10 @@ * @exception IllegalStateException if this method is called on an * invalidated session * + * @deprecated As of Version 2.2, this method is + * replaced by {...@link #setAttribute} */ - - @Deprecated + @SuppressWarnings("dep-ann") // Spec API does not use @Deprecated public void putValue(String name, Object value); @@ -372,18 +362,16 @@ /** - * - * @deprecated As of Version 2.2, this method is - * replaced by {...@link #removeAttribute} - * * @param name the name of the object to * remove from this session * * @exception IllegalStateException if this method is called on an * invalidated session + * + * @deprecated As of Version 2.2, this method is + * replaced by {...@link #removeAttribute} */ - - @Deprecated + @SuppressWarnings("dep-ann") // Spec API does not use @Deprecated public void removeValue(String name); Modified: tomcat/trunk/java/javax/servlet/http/HttpSessionContext.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/http/HttpSessionContext.java?rev=907493&r1=907492&r2=907493&view=diff ============================================================================== --- tomcat/trunk/java/javax/servlet/http/HttpSessionContext.java (original) +++ tomcat/trunk/java/javax/servlet/http/HttpSessionContext.java Sun Feb 7 21:12:03 2010 @@ -35,9 +35,7 @@ * @see HttpSessionBindingListener * */ - - -...@deprecated +...@suppresswarnings("dep-ann") // Spec API does not use @Deprecated public interface HttpSessionContext { /** @@ -48,8 +46,7 @@ * a future version of this API. * */ - - @Deprecated + @SuppressWarnings("dep-ann") // Spec API does not use @Deprecated public HttpSession getSession(String sessionId); @@ -63,8 +60,7 @@ * in a future version of this API. * */ - - @Deprecated + @SuppressWarnings("dep-ann") // Spec API does not use @Deprecated public Enumeration<String> getIds(); } Modified: tomcat/trunk/java/javax/servlet/http/HttpUtils.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/http/HttpUtils.java?rev=907493&r1=907492&r2=907493&view=diff ============================================================================== --- tomcat/trunk/java/javax/servlet/http/HttpUtils.java (original) +++ tomcat/trunk/java/javax/servlet/http/HttpUtils.java Sun Feb 7 21:12:03 2010 @@ -28,11 +28,8 @@ * These methods were only useful * with the default encoding and have been moved * to the request interfaces. - * -*/ - - -...@deprecated + */ +...@suppresswarnings("dep-ann") // Spec API does not use @Deprecated public class HttpUtils { private static final String LSTRING_FILE = --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org