RE: svn commit: r1354112 - in /tomcat/trunk/java/javax/servlet: ./ http/
> -Original Message- > From: Konstantin Kolinko [mailto:knst.koli...@gmail.com] > Sent: Tuesday, June 26, 2012 11:38 AM > To: Tomcat Developers List > Subject: Re: svn commit: r1354112 - in /tomcat/trunk/java/javax/servlet: > ./ http/ > > 2012/6/26 : > > Author: fhanik > > Date: Tue Jun 26 17:07:22 2012 > > New Revision: 1354112 > > > > URL: http://svn.apache.org/viewvc?rev=1354112&view=rev > > Log: > > In preparation for next servlet revision > > Align with the servlet specification signatures as they are defined by > the spec itself. These do not represent any functional changes > > Most of these are just ordering of methods, others are runtime > exception that are defined differently in the method signatures > > > > As an fyi, the easiest way to compare signatures between two libraries > is to use javap and diff on the output, that's how I found these > changes, verified them against the javadoc and implemented into tomcat > > > > > > > > Modified: > > tomcat/trunk/java/javax/servlet/AsyncContext.java > > tomcat/trunk/java/javax/servlet/RequestDispatcher.java > > 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/ServletSecurityElement.java > > tomcat/trunk/java/javax/servlet/http/Cookie.java > > tomcat/trunk/java/javax/servlet/http/HttpServletRequest.java > > tomcat/trunk/java/javax/servlet/http/HttpServletRequestWrapper.java > > > > > --- tomcat/trunk/java/javax/servlet/RequestDispatcher.java (original) > > +++ tomcat/trunk/java/javax/servlet/RequestDispatcher.java Tue Jun 26 > 17:07:22 2012 > > @@ -39,22 +39,22 @@ import java.io.IOException; > > */ > > public interface RequestDispatcher { > > > > + static final String FORWARD_REQUEST_URI = > "javax.servlet.forward.request_uri"; > > + static final String FORWARD_CONTEXT_PATH = > "javax.servlet.forward.context_path"; > > + static final String FORWARD_PATH_INFO = > "javax.servlet.forward.path_info"; > > + static final String FORWARD_SERVLET_PATH = > "javax.servlet.forward.servlet_path"; > > + static final String FORWARD_QUERY_STRING = > "javax.servlet.forward.query_string"; > > + static final String INCLUDE_REQUEST_URI = > "javax.servlet.include.request_uri"; > > + static final String INCLUDE_CONTEXT_PATH = > "javax.servlet.include.context_path"; > > + static final String INCLUDE_PATH_INFO = > "javax.servlet.include.path_info"; > > + static final String INCLUDE_SERVLET_PATH = > "javax.servlet.include.servlet_path"; > > + static final String INCLUDE_QUERY_STRING = > "javax.servlet.include.query_string"; > > Maybe "public static final"? > It is not necessary in an interface, but for consistency with below > ones. [Filip Hanik] I'm just following the Servlet 3.0 signatures. Since it doesn't matter, leaving it as is easier when tracking diffs. If you were to run a javap against it, you'd find that the code that yields the JavaDoc have the same definitions. Filip > > > public static final String ERROR_EXCEPTION = > "javax.servlet.error.exception"; > > public static final String ERROR_EXCEPTION_TYPE = > "javax.servlet.error.exception_type"; > > public static final String ERROR_MESSAGE = > "javax.servlet.error.message"; > > public static final String ERROR_REQUEST_URI = > "javax.servlet.error.request_uri"; > > public static final String ERROR_SERVLET_NAME = > "javax.servlet.error.servlet_name"; > > public static final String ERROR_STATUS_CODE = > "javax.servlet.error.status_code"; > > Best regards, > Konstantin Kolinko > > - > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r1354112 - in /tomcat/trunk/java/javax/servlet: ./ http/
2012/6/26 : > Author: fhanik > Date: Tue Jun 26 17:07:22 2012 > New Revision: 1354112 > > URL: http://svn.apache.org/viewvc?rev=1354112&view=rev > Log: > In preparation for next servlet revision > Align with the servlet specification signatures as they are defined by the > spec itself. These do not represent any functional changes > Most of these are just ordering of methods, others are runtime exception that > are defined differently in the method signatures > > As an fyi, the easiest way to compare signatures between two libraries is to > use javap and diff on the output, that's how I found these changes, verified > them against the javadoc and implemented into tomcat > > > > Modified: > tomcat/trunk/java/javax/servlet/AsyncContext.java > tomcat/trunk/java/javax/servlet/RequestDispatcher.java > 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/ServletSecurityElement.java > tomcat/trunk/java/javax/servlet/http/Cookie.java > tomcat/trunk/java/javax/servlet/http/HttpServletRequest.java > tomcat/trunk/java/javax/servlet/http/HttpServletRequestWrapper.java > > --- tomcat/trunk/java/javax/servlet/RequestDispatcher.java (original) > +++ tomcat/trunk/java/javax/servlet/RequestDispatcher.java Tue Jun 26 > 17:07:22 2012 > @@ -39,22 +39,22 @@ import java.io.IOException; > */ > public interface RequestDispatcher { > > + static final String FORWARD_REQUEST_URI = > "javax.servlet.forward.request_uri"; > + static final String FORWARD_CONTEXT_PATH = > "javax.servlet.forward.context_path"; > + static final String FORWARD_PATH_INFO = > "javax.servlet.forward.path_info"; > + static final String FORWARD_SERVLET_PATH = > "javax.servlet.forward.servlet_path"; > + static final String FORWARD_QUERY_STRING = > "javax.servlet.forward.query_string"; > + static final String INCLUDE_REQUEST_URI = > "javax.servlet.include.request_uri"; > + static final String INCLUDE_CONTEXT_PATH = > "javax.servlet.include.context_path"; > + static final String INCLUDE_PATH_INFO = > "javax.servlet.include.path_info"; > + static final String INCLUDE_SERVLET_PATH = > "javax.servlet.include.servlet_path"; > + static final String INCLUDE_QUERY_STRING = > "javax.servlet.include.query_string"; Maybe "public static final"? It is not necessary in an interface, but for consistency with below ones. > public static final String ERROR_EXCEPTION = > "javax.servlet.error.exception"; > public static final String ERROR_EXCEPTION_TYPE = > "javax.servlet.error.exception_type"; > public static final String ERROR_MESSAGE = "javax.servlet.error.message"; > public static final String ERROR_REQUEST_URI = > "javax.servlet.error.request_uri"; > public static final String ERROR_SERVLET_NAME = > "javax.servlet.error.servlet_name"; > public static final String ERROR_STATUS_CODE = > "javax.servlet.error.status_code"; Best regards, Konstantin Kolinko - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1354112 - in /tomcat/trunk/java/javax/servlet: ./ http/
Author: fhanik Date: Tue Jun 26 17:07:22 2012 New Revision: 1354112 URL: http://svn.apache.org/viewvc?rev=1354112&view=rev Log: In preparation for next servlet revision Align with the servlet specification signatures as they are defined by the spec itself. These do not represent any functional changes Most of these are just ordering of methods, others are runtime exception that are defined differently in the method signatures As an fyi, the easiest way to compare signatures between two libraries is to use javap and diff on the output, that's how I found these changes, verified them against the javadoc and implemented into tomcat Modified: tomcat/trunk/java/javax/servlet/AsyncContext.java tomcat/trunk/java/javax/servlet/RequestDispatcher.java 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/ServletSecurityElement.java tomcat/trunk/java/javax/servlet/http/Cookie.java tomcat/trunk/java/javax/servlet/http/HttpServletRequest.java tomcat/trunk/java/javax/servlet/http/HttpServletRequestWrapper.java Modified: tomcat/trunk/java/javax/servlet/AsyncContext.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/AsyncContext.java?rev=1354112&r1=1354111&r2=1354112&view=diff == --- tomcat/trunk/java/javax/servlet/AsyncContext.java (original) +++ tomcat/trunk/java/javax/servlet/AsyncContext.java Tue Jun 26 17:07:22 2012 @@ -73,12 +73,12 @@ public interface AsyncContext { throws ServletException; /** - * Get timeout in milliseconds. 0 or less indicates no timeout. + * Set timeout in milliseconds. 0 or less indicates no timeout. */ -long getTimeout(); +void setTimeout(long timeout); /** - * Set timeout in milliseconds. 0 or less indicates no timeout. + * Get timeout in milliseconds. 0 or less indicates no timeout. */ -void setTimeout(long timeout); +long getTimeout(); } Modified: tomcat/trunk/java/javax/servlet/RequestDispatcher.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/RequestDispatcher.java?rev=1354112&r1=1354111&r2=1354112&view=diff == --- tomcat/trunk/java/javax/servlet/RequestDispatcher.java (original) +++ tomcat/trunk/java/javax/servlet/RequestDispatcher.java Tue Jun 26 17:07:22 2012 @@ -39,22 +39,22 @@ import java.io.IOException; */ public interface RequestDispatcher { +static final String FORWARD_REQUEST_URI = "javax.servlet.forward.request_uri"; +static final String FORWARD_CONTEXT_PATH = "javax.servlet.forward.context_path"; +static final String FORWARD_PATH_INFO = "javax.servlet.forward.path_info"; +static final String FORWARD_SERVLET_PATH = "javax.servlet.forward.servlet_path"; +static final String FORWARD_QUERY_STRING = "javax.servlet.forward.query_string"; +static final String INCLUDE_REQUEST_URI = "javax.servlet.include.request_uri"; +static final String INCLUDE_CONTEXT_PATH = "javax.servlet.include.context_path"; +static final String INCLUDE_PATH_INFO = "javax.servlet.include.path_info"; +static final String INCLUDE_SERVLET_PATH = "javax.servlet.include.servlet_path"; +static final String INCLUDE_QUERY_STRING = "javax.servlet.include.query_string"; public static final String ERROR_EXCEPTION = "javax.servlet.error.exception"; public static final String ERROR_EXCEPTION_TYPE = "javax.servlet.error.exception_type"; public static final String ERROR_MESSAGE = "javax.servlet.error.message"; public static final String ERROR_REQUEST_URI = "javax.servlet.error.request_uri"; public static final String ERROR_SERVLET_NAME = "javax.servlet.error.servlet_name"; public static final String ERROR_STATUS_CODE = "javax.servlet.error.status_code"; -public static final String FORWARD_CONTEXT_PATH = "javax.servlet.forward.context_path"; -public static final String FORWARD_PATH_INFO = "javax.servlet.forward.path_info"; -public static final String FORWARD_QUERY_STRING = "javax.servlet.forward.query_string"; -public static final String FORWARD_REQUEST_URI = "javax.servlet.forward.request_uri"; -public static final String FORWARD_SERVLET_PATH = "javax.servlet.forward.servlet_path"; -public static final String INCLUDE_CONTEXT_PATH = "javax.servlet.include.context_path"; -public static final String INCLUDE_PATH_INFO = "javax.servlet.include.path_info"; -public static final String INCLUDE_QUERY_STRING = "javax.servlet.include.query_string"; -public static final String INCLUDE_REQUEST_URI = "javax.servlet.include.request_uri"; -public static final String INCLUDE_SERVLET_PATH = "javax.servlet.include.servlet_path"; /** * Forwards a request fro