tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fha...@apache.org
Subject svn commit: r1354112 - in /tomcat/trunk/java/javax/servlet: ./ http/
Date Tue, 26 Jun 2012 17:07:27 GMT
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 from a servlet to another resource (servlet, JSP file,

Modified: tomcat/trunk/java/javax/servlet/ServletContext.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/ServletContext.java?rev=1354112&r1=1354111&r2=1354112&view=diff
==============================================================================
--- tomcat/trunk/java/javax/servlet/ServletContext.java (original)
+++ tomcat/trunk/java/javax/servlet/ServletContext.java Tue Jun 26 17:07:22 2012
@@ -60,6 +60,8 @@ public interface ServletContext {
      */
     public static final String ORDERED_LIBS = "javax.servlet.context.orderedLibs";
 
+    public String getContextPath();
+
     /**
      * Returns a <code>ServletContext</code> object that corresponds to a
      * specified URL on the server.
@@ -83,8 +85,6 @@ public interface ServletContext {
      */
     public ServletContext getContext(String uripath);
 
-    public String getContextPath();
-
     /**
      * Returns the major version of the Java Servlet API that this servlet
      * container supports. All implementations that comply with Version 3.0 must
@@ -644,8 +644,7 @@ public interface ServletContext {
      * @since Servlet 3.0 TODO SERVLET3 - Add comments
      */
     public void setSessionTrackingModes(
-            Set<SessionTrackingMode> sessionTrackingModes)
-            throws IllegalStateException, IllegalArgumentException;
+            Set<SessionTrackingMode> sessionTrackingModes);
 
     /**
      * @return TODO
@@ -660,12 +659,6 @@ public interface ServletContext {
     public Set<SessionTrackingMode> getEffectiveSessionTrackingModes();
 
     /**
-     * @param listenerClass
-     * @since Servlet 3.0 TODO SERVLET3 - Add comments
-     */
-    public void addListener(Class<? extends EventListener> listenerClass);
-
-    /**
      * @param className
      * @since Servlet 3.0 TODO SERVLET3 - Add comments
      */
@@ -679,6 +672,12 @@ public interface ServletContext {
     public <T extends EventListener> void addListener(T t);
 
     /**
+     * @param listenerClass
+     * @since Servlet 3.0 TODO SERVLET3 - Add comments
+     */
+    public void addListener(Class<? extends EventListener> listenerClass);
+
+    /**
      * @param <T>
      * @param c
      * @return TODO
@@ -689,13 +688,11 @@ public interface ServletContext {
             throws ServletException;
 
     /**
-     * @param roleNames
+     * @return TODO
      * @throws UnsupportedOperationException
-     * @throws IllegalArgumentException
-     * @throws IllegalStateException
      * @since Servlet 3.0 TODO SERVLET3 - Add comments
      */
-    public void declareRoles(String... roleNames);
+    public JspConfigDescriptor getJspConfigDescriptor();
 
     /**
      * @return TODO
@@ -706,9 +703,11 @@ public interface ServletContext {
     public ClassLoader getClassLoader();
 
     /**
-     * @return TODO
+     * @param roleNames
      * @throws UnsupportedOperationException
+     * @throws IllegalArgumentException
+     * @throws IllegalStateException
      * @since Servlet 3.0 TODO SERVLET3 - Add comments
      */
-    public JspConfigDescriptor getJspConfigDescriptor();
+    public void declareRoles(String... roleNames);
 }

Modified: tomcat/trunk/java/javax/servlet/ServletRequest.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/ServletRequest.java?rev=1354112&r1=1354111&r2=1354112&view=diff
==============================================================================
--- tomcat/trunk/java/javax/servlet/ServletRequest.java (original)
+++ tomcat/trunk/java/javax/servlet/ServletRequest.java Tue Jun 26 17:07:22 2012
@@ -438,7 +438,7 @@ public interface ServletRequest {
      *             If async is not supported for this request
      * @since Servlet 3.0 TODO SERVLET3 - Add comments
      */
-    public AsyncContext startAsync();
+    public AsyncContext startAsync() throws IllegalStateException;
 
     /**
      * @param servletRequest
@@ -448,7 +448,7 @@ public interface ServletRequest {
      * @since Servlet 3.0 TODO SERVLET3 - Add comments
      */
     public AsyncContext startAsync(ServletRequest servletRequest,
-            ServletResponse servletResponse);
+            ServletResponse servletResponse) throws IllegalStateException;
 
     /**
      * @return TODO

Modified: tomcat/trunk/java/javax/servlet/ServletRequestWrapper.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/ServletRequestWrapper.java?rev=1354112&r1=1354111&r2=1354112&view=diff
==============================================================================
--- tomcat/trunk/java/javax/servlet/ServletRequestWrapper.java (original)
+++ tomcat/trunk/java/javax/servlet/ServletRequestWrapper.java Tue Jun 26 17:07:22 2012
@@ -360,7 +360,7 @@ public class ServletRequestWrapper imple
      * @since Servlet 3.0
      */
     @Override
-    public AsyncContext startAsync() {
+    public AsyncContext startAsync() throws IllegalStateException {
         return request.startAsync();
     }
 

Modified: tomcat/trunk/java/javax/servlet/ServletSecurityElement.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/ServletSecurityElement.java?rev=1354112&r1=1354111&r2=1354112&view=diff
==============================================================================
--- tomcat/trunk/java/javax/servlet/ServletSecurityElement.java (original)
+++ tomcat/trunk/java/javax/servlet/ServletSecurityElement.java Tue Jun 26 17:07:22 2012
@@ -43,6 +43,13 @@ public class ServletSecurityElement exte
         super();
     }
 
+    /**
+     * Use specified HttpConstraintElement.
+     * @param httpConstraintElement
+     */
+    public ServletSecurityElement(HttpConstraintElement httpConstraintElement) {
+        this (httpConstraintElement, null);
+    }
 
     /**
      * Use specific constraints for specified methods and default
@@ -57,13 +64,6 @@ public class ServletSecurityElement exte
         addHttpMethodConstraints(httpMethodConstraints);
     }
 
-    /**
-     * Use specified HttpConstraintElement.
-     * @param httpConstraintElement
-     */
-    public ServletSecurityElement(HttpConstraintElement httpConstraintElement) {
-        this (httpConstraintElement, null);
-    }
 
     /**
      * Use specified HttpConstraintElement as default and specific constraints

Modified: tomcat/trunk/java/javax/servlet/http/Cookie.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/http/Cookie.java?rev=1354112&r1=1354111&r2=1354112&view=diff
==============================================================================
--- tomcat/trunk/java/javax/servlet/http/Cookie.java (original)
+++ tomcat/trunk/java/javax/servlet/http/Cookie.java Tue Jun 26 17:07:22 2012
@@ -451,18 +451,18 @@ public class Cookie implements Cloneable
     }
 
     /**
-     * @return TODO
+     * @param httpOnly
      * @since Servlet 3.0 TODO SERVLET3 - Add comments
      */
-    public boolean isHttpOnly() {
-        return httpOnly;
+    public void setHttpOnly(boolean httpOnly) {
+        this.httpOnly = httpOnly;
     }
 
     /**
-     * @param httpOnly
+     * @return TODO
      * @since Servlet 3.0 TODO SERVLET3 - Add comments
      */
-    public void setHttpOnly(boolean httpOnly) {
-        this.httpOnly = httpOnly;
+    public boolean isHttpOnly() {
+        return httpOnly;
     }
 }

Modified: tomcat/trunk/java/javax/servlet/http/HttpServletRequest.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/http/HttpServletRequest.java?rev=1354112&r1=1354111&r2=1354112&view=diff
==============================================================================
--- tomcat/trunk/java/javax/servlet/http/HttpServletRequest.java (original)
+++ tomcat/trunk/java/javax/servlet/http/HttpServletRequest.java Tue Jun 26 17:07:22 2012
@@ -465,7 +465,7 @@ public interface HttpServletRequest exte
      * @since Servlet 3.0
      */
     public Collection<Part> getParts() throws IOException,
-            IllegalStateException, ServletException;
+            ServletException;
 
     /**
      * Gets the named Part or null if the Part does not exist. Triggers upload
@@ -481,6 +481,6 @@ public interface HttpServletRequest exte
      *             if the request is not multipart/form-data
      * @since Servlet 3.0
      */
-    public Part getPart(String name) throws IOException, IllegalStateException,
+    public Part getPart(String name) throws IOException,
             ServletException;
 }

Modified: tomcat/trunk/java/javax/servlet/http/HttpServletRequestWrapper.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/http/HttpServletRequestWrapper.java?rev=1354112&r1=1354111&r2=1354112&view=diff
==============================================================================
--- tomcat/trunk/java/javax/servlet/http/HttpServletRequestWrapper.java (original)
+++ tomcat/trunk/java/javax/servlet/http/HttpServletRequestWrapper.java Tue Jun 26 17:07:22
2012
@@ -307,8 +307,8 @@ public class HttpServletRequestWrapper e
      * @since Servlet 3.0 TODO SERVLET3 - Add comments
      */
     @Override
-    public Collection<Part> getParts() throws IllegalStateException,
-            IOException, ServletException {
+    public Collection<Part> getParts() throws IOException,
+            ServletException {
         return this._getHttpServletRequest().getParts();
     }
 
@@ -319,7 +319,7 @@ public class HttpServletRequestWrapper e
      * @since Servlet 3.0 TODO SERVLET3 - Add comments
      */
     @Override
-    public Part getPart(String name) throws IllegalStateException, IOException,
+    public Part getPart(String name) throws IOException,
             ServletException {
         return this._getHttpServletRequest().getPart(name);
     }



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


Mime
View raw message