Author: markt
Date: Tue Oct 23 11:34:15 2012
New Revision: 1401253
URL: http://svn.apache.org/viewvc?rev=1401253&view=rev
Log:
Sync with trunk
Added:
tomcat/sandbox/trunk-resources/java/javax/net/
- copied from r1401252, tomcat/trunk/java/javax/net/
tomcat/sandbox/trunk-resources/res/META-INF/websocket-api.jar.manifest
- copied unchanged from r1401252, tomcat/trunk/res/META-INF/websocket-api.jar.manifest
tomcat/sandbox/trunk-resources/test/org/apache/jasper/compiler/TestJspReader.java
- copied unchanged from r1401252, tomcat/trunk/test/org/apache/jasper/compiler/TestJspReader.java
tomcat/sandbox/trunk-resources/test/webapp-3.0/bug53986.jsp
- copied unchanged from r1401252, tomcat/trunk/test/webapp-3.0/bug53986.jsp
Removed:
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/AttributeReader.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/CodeException.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/Field.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/InnerClass.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/LineNumber.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/LocalVariable.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/Method.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/util/ByteSequence.java
Modified:
tomcat/sandbox/trunk-resources/ (props changed)
tomcat/sandbox/trunk-resources/build.xml
tomcat/sandbox/trunk-resources/java/javax/servlet/ServletInputStream.java
tomcat/sandbox/trunk-resources/java/javax/servlet/ServletOutputStream.java
tomcat/sandbox/trunk-resources/java/javax/servlet/http/Cookie.java
tomcat/sandbox/trunk-resources/java/javax/servlet/http/HttpServlet.java
tomcat/sandbox/trunk-resources/java/javax/servlet/http/HttpServletRequest.java
tomcat/sandbox/trunk-resources/java/javax/servlet/http/HttpServletRequestWrapper.java
tomcat/sandbox/trunk-resources/java/javax/servlet/http/HttpServletResponse.java
tomcat/sandbox/trunk-resources/java/javax/servlet/http/HttpServletResponseWrapper.java
tomcat/sandbox/trunk-resources/java/javax/servlet/http/HttpSession.java
tomcat/sandbox/trunk-resources/java/javax/servlet/http/LocalStrings.properties
tomcat/sandbox/trunk-resources/java/javax/servlet/http/ProtocolHandler.java
tomcat/sandbox/trunk-resources/java/javax/servlet/http/WebConnection.java
tomcat/sandbox/trunk-resources/java/org/apache/catalina/connector/Connector.java
tomcat/sandbox/trunk-resources/java/org/apache/catalina/connector/CoyoteInputStream.java
tomcat/sandbox/trunk-resources/java/org/apache/catalina/connector/InputBuffer.java
tomcat/sandbox/trunk-resources/java/org/apache/catalina/connector/Response.java
tomcat/sandbox/trunk-resources/java/org/apache/catalina/core/AsyncContextImpl.java
tomcat/sandbox/trunk-resources/java/org/apache/catalina/core/StandardWrapper.java
tomcat/sandbox/trunk-resources/java/org/apache/catalina/filters/CsrfPreventionFilter.java
tomcat/sandbox/trunk-resources/java/org/apache/catalina/ha/session/mbeans-descriptors.xml
tomcat/sandbox/trunk-resources/java/org/apache/catalina/mbeans/MBeanFactory.java
tomcat/sandbox/trunk-resources/java/org/apache/catalina/tribes/MembershipService.java
tomcat/sandbox/trunk-resources/java/org/apache/catalina/tribes/transport/PooledSender.java
tomcat/sandbox/trunk-resources/java/org/apache/catalina/valves/AccessLogValve.java
tomcat/sandbox/trunk-resources/java/org/apache/coyote/AbstractProtocol.java
tomcat/sandbox/trunk-resources/java/org/apache/coyote/ajp/AbstractAjpProcessor.java
tomcat/sandbox/trunk-resources/java/org/apache/coyote/ajp/AjpAprProtocol.java
tomcat/sandbox/trunk-resources/java/org/apache/coyote/http11/Http11AprProtocol.java
tomcat/sandbox/trunk-resources/java/org/apache/coyote/http11/upgrade/UpgradeNioProcessor.java
tomcat/sandbox/trunk-resources/java/org/apache/jasper/compiler/JspReader.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/ (props changed)
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/Constants.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/AnnotationDefault.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/AnnotationElementValue.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/AnnotationEntry.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/Annotations.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/ArrayElementValue.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/Attribute.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/ClassElementValue.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/ClassFormatException.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/Code.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/Constant.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/ConstantCP.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/ConstantClass.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/ConstantDouble.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/ConstantFloat.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/ConstantInteger.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/ConstantInvokeDynamic.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/ConstantLong.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/ConstantMethodHandle.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/ConstantMethodType.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/ConstantNameAndType.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/ConstantPool.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/ConstantString.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/ConstantUtf8.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/ConstantValue.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/Deprecated.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/ElementValue.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/ElementValuePair.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/EnclosingMethod.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/EnumElementValue.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/ExceptionTable.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/FieldOrMethod.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/InnerClasses.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/JavaClass.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/LineNumberTable.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/LocalVariableTable.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/LocalVariableTypeTable.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/PMGClass.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/ParameterAnnotations.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/RuntimeInvisibleAnnotations.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/RuntimeInvisibleParameterAnnotations.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/RuntimeVisibleAnnotations.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/RuntimeVisibleParameterAnnotations.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/Signature.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/SimpleElementValue.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/SourceFile.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/StackMap.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/StackMapEntry.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/StackMapTable.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/StackMapTableEntry.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/StackMapType.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/Synthetic.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/Unknown.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/classfile/Utility.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/http/fileupload/ (props changed)
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/http/fileupload/FileCleaningTracker.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/modeler/BaseModelMBean.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/modeler/ManagedBean.java
tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/net/AprEndpoint.java
tomcat/sandbox/trunk-resources/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java
tomcat/sandbox/trunk-resources/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/JdbcInterceptor.java
tomcat/sandbox/trunk-resources/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PooledConnection.java
tomcat/sandbox/trunk-resources/res/checkstyle/javax-import-control.xml
tomcat/sandbox/trunk-resources/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java
tomcat/sandbox/trunk-resources/test/org/apache/tomcat/util/net/TestSsl.java
tomcat/sandbox/trunk-resources/webapps/docs/changelog.xml
tomcat/sandbox/trunk-resources/webapps/examples/WEB-INF/jsp/applet/Clock2.java
Propchange: tomcat/sandbox/trunk-resources/
------------------------------------------------------------------------------
Merged /tomcat/trunk:r1396288-1401252
Modified: tomcat/sandbox/trunk-resources/build.xml
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/build.xml?rev=1401253&r1=1401252&r2=1401253&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/build.xml (original)
+++ tomcat/sandbox/trunk-resources/build.xml Tue Oct 23 11:34:15 2012
@@ -47,6 +47,7 @@
<property name="servlet.revision" value="FR" />
<property name="jsp.revision" value="FR" />
<property name="el.revision" value="FR" />
+ <property name="websocket.revision" value="FR" />
<!-- Release artifact base names -->
<property name="final.name" value="${project}-${version}" />
@@ -74,7 +75,7 @@
<!-- build output directory for jdbc-pool -->
<property name="tomcat.pool" value="${tomcat.output}/jdbc-pool"/>
- <!-- Servlet 3.1 spec requires 1.7+ - these get overriden by build.properties(.default)-->
+ <!-- Servlet 3.1 spec requires 1.7+ -->
<property name="compile.source" value="1.7"/>
<property name="compile.target" value="1.7"/>
@@ -87,6 +88,7 @@
<property name="servlet-api.jar" value="${tomcat.build}/lib/servlet-api.jar"/>
<property name="jsp-api.jar" value="${tomcat.build}/lib/jsp-api.jar"/>
<property name="el-api.jar" value="${tomcat.build}/lib/el-api.jar"/>
+ <property name="websocket-api.jar" value="${tomcat.build}/lib/websocket-api.jar"/>
<property name="catalina.jar" value="${tomcat.build}/lib/catalina.jar"/>
<property name="catalina-tribes.jar" value="${tomcat.build}/lib/catalina-tribes.jar"/>
<property name="catalina-ha.jar" value="${tomcat.build}/lib/catalina-ha.jar"/>
@@ -111,6 +113,7 @@
<property name="servlet-api-src.jar" value="${tomcat.src.jars}/servlet-api-src.jar"/>
<property name="jsp-api-src.jar" value="${tomcat.src.jars}/jsp-api-src.jar"/>
<property name="el-api-src.jar" value="${tomcat.src.jars}/el-api-src.jar"/>
+ <property name="websocket-api-src.jar" value="${tomcat.src.jars}/websocket-api-src.jar"/>
<property name="catalina-src.jar" value="${tomcat.src.jars}/catalina-src.jar"/>
<property name="catalina-tribes-src.jar" value="${tomcat.src.jars}/catalina-tribes-src.jar"/>
<property name="catalina-ha-src.jar" value="${tomcat.src.jars}/catalina-ha-src.jar"/>
@@ -278,6 +281,10 @@
<include name="javax/el/*" />
</patternset>
+ <patternset id="files.websocket-api">
+ <include name="javax/net/websocket/**" />
+ </patternset>
+
<patternset id="files.bootstrap">
<include name="org/apache/catalina/startup/Bootstrap.*" />
<include name="org/apache/catalina/startup/catalina.properties" />
@@ -368,6 +375,7 @@
<patternset refid="files.catalina" />
<patternset refid="files.el-api" />
<patternset refid="files.servlet-api" />
+ <patternset refid="files.websocket-api" />
<patternset refid="files.tomcat-api" />
<!-- These pattern sets conflict so include files directly
<patternset refid="files.tomcat-coyote" />
@@ -609,6 +617,7 @@
<filter token="servlet.revision" value="${servlet.revision}"/>
<filter token="jsp.revision" value="${jsp.revision}"/>
<filter token="el.revision" value="${el.revision}"/>
+ <filter token="websocket.revision" value="${websocket.revision}"/>
<mkdir dir="${tomcat.manifests}" />
<copy todir="${tomcat.manifests}" overwrite="yes" filtering="yes"
@@ -652,6 +661,12 @@
filesId="files.el-api"
manifest="${tomcat.manifests}/el-api.jar.manifest" />
+ <!-- WebSocket 1.0 Implementation JAR File -->
+ <jarIt jarfile="${websocket-api.jar}"
+ filesDir="${tomcat.classes}"
+ filesId="files.websocket-api"
+ manifest="${tomcat.manifests}/websocket-api.jar.manifest" />
+
<!-- Bootstrap JAR File -->
<jarIt jarfile="${bootstrap.jar}"
filesDir="${tomcat.classes}"
@@ -1640,6 +1655,23 @@ Apache Tomcat ${version} native binaries
<path location="${ant.core.lib}"/>
</classpath>
</javadoc>
+ <javadoc packagenames="javax.net.websocket.*"
+ sourcepath="${tomcat.dist}/src/java"
+ destdir="${tomcat.dist}/webapps/docs/websocketapi"
+ version="true"
+ windowtitle="WebSocket 1.0 API Documentation - Apache Tomcat ${version}"
+ doctitle="WebSocket 1.0 API - Apache Tomcat ${version}"
+ header="<b>WebSocket 1.0 - Apache Tomcat ${version}</b>"
+ bottom="Copyright &#169; 2000-${year} Apache Software Foundation. All Rights Reserved."
+ encoding="ISO-8859-1"
+ additionalparam="-breakiterator"
+ maxmemory="256m" >
+ <classpath>
+ <path refid="compile.classpath"/>
+ <path refid="tomcat.webservices.classpath"/>
+ <path location="${ant.core.lib}"/>
+ </classpath>
+ </javadoc>
<javadoc packagenames="org.apache.*"
destdir="${tomcat.dist}/webapps/docs/api"
version="true"
@@ -1658,6 +1690,7 @@ Apache Tomcat ${version} native binaries
<link href="../servletapi"/>
<link href="../jspapi"/>
<link href="../elapi"/>
+ <link href="../websocketapi"/>
<link href="http://docs.oracle.com/javase/6/docs/api/"/>
<link href="http://commons.apache.org/io/api-release/"/>
<link href="http://docs.oracle.com/javaee/6/api/"/>
@@ -1681,6 +1714,7 @@ Apache Tomcat ${version} native binaries
<include name="jasper.jar"/>
<include name="jasper-el.jar"/>
<include name="servlet-api.jar"/>
+ <include name="websocket-api.jar"/>
<include name="tomcat-coyote.jar"/>
<include name="tomcat-util.jar"/>
</fileset>
@@ -2210,6 +2244,12 @@ Apache Tomcat ${version} native binaries
filesId="files.el-api"
manifest="${tomcat.manifests}/el-api.jar.manifest" />
+ <!-- WebSocket 1.0 EL Implementation JAR File -->
+ <jarIt jarfile="${websocket-api-src.jar}"
+ filesDir="java"
+ filesId="files.websocket-api"
+ manifest="${tomcat.manifests}/websocket-api.jar.manifest" />
+
<!-- Bootstrap JAR File -->
<jarIt jarfile="${bootstrap-src.jar}"
filesDir="java"
Modified: tomcat/sandbox/trunk-resources/java/javax/servlet/ServletInputStream.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/javax/servlet/ServletInputStream.java?rev=1401253&r1=1401252&r2=1401253&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/javax/servlet/ServletInputStream.java (original)
+++ tomcat/sandbox/trunk-resources/java/javax/servlet/ServletInputStream.java Tue Oct 23 11:34:15 2012
@@ -83,28 +83,21 @@ public abstract class ServletInputStream
}
/**
- * TODO SERVLET 3.1
- * @return TODO
- */
- public abstract int dataAvailable();
-
-
- /**
- * TODO SERVLET 3.1
- * @return TODO
+ * Returns <code>true</code> if all the data has been read from the stream,
+ * else <code>false</code>.
*/
public abstract boolean isFinished();
/**
- * TODO SERVLET 3.1
- * If this returns false, the container will invoke
- * {@link ReadListener#onDataAvailable()} when data is available.
- * @return TODO
+ * Returns <code>true</code> if data can be read without blocking, else
+ * <code>false</code>. If this method is called and returns false, the
+ * container will invoke {@link ReadListener#onDataAvailable()} when data is
+ * available.
*/
public abstract boolean isReady();
/**
- * TODO SERVLET 3.1
+ * Sets the {@link ReadListener} for this {@link ServletInputStream}.
*/
- public abstract void setReadListener(javax.servlet.ReadListener listener);
+ public abstract void setReadListener(ReadListener listener);
}
Modified: tomcat/sandbox/trunk-resources/java/javax/servlet/ServletOutputStream.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/javax/servlet/ServletOutputStream.java?rev=1401253&r1=1401252&r2=1401253&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/javax/servlet/ServletOutputStream.java (original)
+++ tomcat/sandbox/trunk-resources/java/javax/servlet/ServletOutputStream.java Tue Oct 23 11:34:15 2012
@@ -283,4 +283,5 @@ public abstract class ServletOutputStrea
/**
* TODO SERVLET 3.1
*/
- public abstract void setWriteListener(javax.servlet.WriteListener listener);}
+ public abstract void setWriteListener(javax.servlet.WriteListener listener);
+}
Modified: tomcat/sandbox/trunk-resources/java/javax/servlet/http/Cookie.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/javax/servlet/http/Cookie.java?rev=1401253&r1=1401252&r2=1401253&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/javax/servlet/http/Cookie.java (original)
+++ tomcat/sandbox/trunk-resources/java/javax/servlet/http/Cookie.java Tue Oct 23 11:34:15 2012
@@ -50,9 +50,6 @@ import java.util.ResourceBundle;
* This class supports both the Version 0 (by Netscape) and Version 1 (by RFC
* 2109) cookie specifications. By default, cookies are created using Version 0
* to ensure the best interoperability.
- *
- * @author Various
- * @version $Version$
*/
public class Cookie implements Cloneable, Serializable {
@@ -395,11 +392,13 @@ public class Cookie implements Cloneable
"org.apache.catalina.STRICT_SERVLET_COMPLIANCE",
"false")).booleanValue();
- String fwdSlashIsSeparator = System.getProperty("org.apache.tomcat.util.http.ServerCookie.FWD_SLASH_IS_SEPARATOR");
+ String fwdSlashIsSeparator = System.getProperty(
+ "org.apache.tomcat.util.http.ServerCookie.FWD_SLASH_IS_SEPARATOR");
if (fwdSlashIsSeparator == null) {
FWD_SLASH_IS_SEPARATOR = STRICT_SERVLET_COMPLIANCE;
} else {
- FWD_SLASH_IS_SEPARATOR = Boolean.valueOf(fwdSlashIsSeparator).booleanValue();
+ FWD_SLASH_IS_SEPARATOR =
+ Boolean.valueOf(fwdSlashIsSeparator).booleanValue();
}
if (FWD_SLASH_IS_SEPARATOR) {
@@ -408,7 +407,8 @@ public class Cookie implements Cloneable
tspecials2 = tspecials2NoSlash;
}
- String strictNaming = System.getProperty("org.apache.tomcat.util.http.ServerCookie.STRICT_NAMING");
+ String strictNaming = System.getProperty(
+ "org.apache.tomcat.util.http.ServerCookie.STRICT_NAMING");
if (strictNaming == null) {
STRICT_NAMING = STRICT_SERVLET_COMPLIANCE;
} else {
@@ -452,16 +452,24 @@ public class Cookie implements Cloneable
}
/**
- * @param httpOnly
- * @since Servlet 3.0 TODO SERVLET3 - Add comments
+ * Sets the flag that controls if this cookie will be hidden from scripts on
+ * the client side.
+ *
+ * @param httpOnly The new value of the flag
+ *
+ * @since Servlet 3.0
*/
public void setHttpOnly(boolean httpOnly) {
this.httpOnly = httpOnly;
}
/**
- * @return TODO
- * @since Servlet 3.0 TODO SERVLET3 - Add comments
+ * Gets the flag that controls if this cookie will be hidden from scripts on
+ * the client side.
+ *
+ * @return <code>true</code> if the cookie is hidden from scripts, else
+ * <code>false</code>
+ * @since Servlet 3.0
*/
public boolean isHttpOnly() {
return httpOnly;
Modified: tomcat/sandbox/trunk-resources/java/javax/servlet/http/HttpServlet.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/javax/servlet/http/HttpServlet.java?rev=1401253&r1=1401252&r2=1401253&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/javax/servlet/http/HttpServlet.java (original)
+++ tomcat/sandbox/trunk-resources/java/javax/servlet/http/HttpServlet.java Tue Oct 23 11:34:15 2012
@@ -52,7 +52,7 @@ import javax.servlet.ServletResponse;
* <p>There's almost no reason to override the <code>service</code>
* method. <code>service</code> handles standard HTTP
* requests by dispatching them to the handler methods
- * for each HTTP request type (the <code>do</code><i>XXX</i>
+ * for each HTTP request type (the <code>do</code><i>Method</i>
* methods listed above).
*
* <p>Likewise, there's almost no reason to override the
@@ -586,7 +586,7 @@ public abstract class HttpServlet extend
/**
* Receives standard HTTP requests from the public
* <code>service</code> method and dispatches
- * them to the <code>do</code><i>XXX</i> methods defined in
+ * them to the <code>do</code><i>Method</i> methods defined in
* this class. This method is an HTTP-specific version of the
* {@link javax.servlet.Servlet#service} method. There's no
* need to override this method.
@@ -842,35 +842,33 @@ class NoBodyOutputStream extends Servlet
}
@Override
- public void write(byte buf[], int offset, int len)
- throws IOException
- {
- if (len >= 0) {
- contentLength += len;
- } else {
- // XXX
- // isn't this really an IllegalArgumentException?
-
- String msg = lStrings.getString("err.io.negativelength");
- throw new IOException(msg);
+ public void write(byte buf[], int offset, int len) throws IOException {
+ if (buf == null) {
+ throw new NullPointerException(
+ lStrings.getString("err.io.nullArray"));
+ }
+
+ if (offset < 0 || len < 0 || offset+len > buf.length) {
+ String msg = lStrings.getString("err.io.indexOutOfBounds");
+ Object[] msgArgs = new Object[3];
+ msgArgs[0] = Integer.valueOf(offset);
+ msgArgs[1] = Integer.valueOf(len);
+ msgArgs[2] = Integer.valueOf(buf.length);
+ msg = MessageFormat.format(msg, msgArgs);
+ throw new IndexOutOfBoundsException(msg);
}
+
+ contentLength += len;
}
- /**
- * TODO SERVLET 3.1
- * @return
- */
@Override
public boolean canWrite() {
+ // TODO SERVLET 3.1
return false;
}
- /**
- * TODO SERVLET 3.1
- * @param listener
- */
@Override
public void setWriteListener(javax.servlet.WriteListener listener) {
-
+ // TODO SERVLET 3.1
}
}
Modified: tomcat/sandbox/trunk-resources/java/javax/servlet/http/HttpServletRequest.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/javax/servlet/http/HttpServletRequest.java?rev=1401253&r1=1401252&r2=1401253&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/javax/servlet/http/HttpServletRequest.java (original)
+++ tomcat/sandbox/trunk-resources/java/javax/servlet/http/HttpServletRequest.java Tue Oct 23 11:34:15 2012
@@ -29,10 +29,8 @@ import javax.servlet.ServletRequest;
* information for HTTP servlets.
* <p>
* The servlet container creates an <code>HttpServletRequest</code> object and
- * passes it as an argument to the servlet's service methods (<code>doGet</code>, <code>doPost</code>, etc).
- *
- * @author Various
- * @version $Version$
+ * passes it as an argument to the servlet's service methods
+ * (<code>doGet</code>, <code>doPost</code>, etc).
*/
public interface HttpServletRequest extends ServletRequest {
@@ -310,11 +308,11 @@ public interface HttpServletRequest exte
* </table>
* <p>
* To reconstruct an URL with a scheme and host, use
- * {@link HttpUtils#getRequestURL}.
+ * {@link #getRequestURL}.
*
* @return a <code>String</code> containing the part of the URL from the
* protocol name up to the query string
- * @see HttpUtils#getRequestURL
+ * @see #getRequestURL
*/
public String getRequestURI();
@@ -391,7 +389,6 @@ public interface HttpServletRequest exte
* in the current session context; <code>false</code> otherwise
* @see #getRequestedSessionId
* @see #getSession
- * @see HttpSessionContext
*/
public boolean isRequestedSessionIdValid();
@@ -423,32 +420,42 @@ public interface HttpServletRequest exte
public boolean isRequestedSessionIdFromUrl();
/**
- * @param response
- * @return TODO
- * @throws IOException
- * @throws ServletException
- * @since Servlet 3.0 TODO SERVLET3 - Add comments
+ * Triggers the same authentication process as would be triggered if the
+ * request is for a resource that is protected by a security constraint.
+ *
+ * @param response The response to use to return any authentication
+ * challenge
+ * @return <code>true</code> if the user is successfully authenticated and
+ * <code>false</code> if not
+ *
+ * @since Servlet 3.0
*/
public boolean authenticate(HttpServletResponse response)
throws IOException, ServletException;
/**
- * @param username
- * @param password
+ * Authenticate the provided user name and password and then associated the
+ * authenticated user with the request.
+ *
+ * @param username The user name to authenticate
+ * @param password The password to use to authenticate the user
+ *
* @throws ServletException
* If any of {@link #getRemoteUser()},
* {@link #getUserPrincipal()} or {@link #getAuthType()} are
* non-null, if the configured authenticator does not support
* user name and password authentication or if the
* authentication fails
- * @since Servlet 3.0 TODO SERVLET3 - Add comments
+ * @since Servlet 3.0
*/
public void login(String username, String password) throws ServletException;
/**
+ * Removes any authenticated user from the request.
+ *
* @throws ServletException
* If the logout fails
- * @since Servlet 3.0 TODO SERVLET3 - Add comments
+ * @since Servlet 3.0
*/
public void logout() throws ServletException;
@@ -485,8 +492,11 @@ public interface HttpServletRequest exte
ServletException;
/**
- * TODO SERVLET 3.1
+ * Start the HTTP upgrade process and pass the connection to the provided
+ * protocol handler once the current request/response pair has completed
+ * processing.
+ *
+ * @since Servlet 3.1
*/
- public abstract void upgrade(javax.servlet.http.ProtocolHandler handler)
- throws java.io.IOException;
+ public void upgrade(ProtocolHandler handler) throws java.io.IOException;
}
Modified: tomcat/sandbox/trunk-resources/java/javax/servlet/http/HttpServletRequestWrapper.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/javax/servlet/http/HttpServletRequestWrapper.java?rev=1401253&r1=1401252&r2=1401253&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/javax/servlet/http/HttpServletRequestWrapper.java (original)
+++ tomcat/sandbox/trunk-resources/java/javax/servlet/http/HttpServletRequestWrapper.java Tue Oct 23 11:34:15 2012
@@ -279,7 +279,13 @@ public class HttpServletRequestWrapper e
}
/**
- * @since Servlet 3.0 TODO SERVLET3 - Add comments
+ * {@inheritDoc}
+ * <p>
+ * The default behavior of this method is to return
+ * {@link HttpServletRequest#authenticate(HttpServletResponse)}
+ * on the wrapped request object.
+ *
+ * @since Servlet 3.0
*/
@Override
public boolean authenticate(HttpServletResponse response)
@@ -288,7 +294,13 @@ public class HttpServletRequestWrapper e
}
/**
- * @since Servlet 3.0 TODO SERVLET3 - Add comments
+ * {@inheritDoc}
+ * <p>
+ * The default behavior of this method is to return
+ * {@link HttpServletRequest#login(String, String)}
+ * on the wrapped request object.
+ *
+ * @since Servlet 3.0
*/
@Override
public void login(String username, String password) throws ServletException {
@@ -296,7 +308,13 @@ public class HttpServletRequestWrapper e
}
/**
- * @since Servlet 3.0 TODO SERVLET3 - Add comments
+ * {@inheritDoc}
+ * <p>
+ * The default behavior of this method is to return
+ * {@link HttpServletRequest#logout()}
+ * on the wrapped request object.
+ *
+ * @since Servlet 3.0
*/
@Override
public void logout() throws ServletException {
@@ -304,7 +322,13 @@ public class HttpServletRequestWrapper e
}
/**
- * @since Servlet 3.0 TODO SERVLET3 - Add comments
+ * {@inheritDoc}
+ * <p>
+ * The default behavior of this method is to return
+ * {@link HttpServletRequest#getParts()}
+ * on the wrapped request object.
+ *
+ * @since Servlet 3.0
*/
@Override
public Collection<Part> getParts() throws IOException,
@@ -313,10 +337,13 @@ public class HttpServletRequestWrapper e
}
/**
- * @throws ServletException
- * @throws IOException
- * @throws IllegalStateException
- * @since Servlet 3.0 TODO SERVLET3 - Add comments
+ * {@inheritDoc}
+ * <p>
+ * The default behavior of this method is to return
+ * {@link HttpServletRequest#getPart(String)}
+ * on the wrapped request object.
+ *
+ * @since Servlet 3.0
*/
@Override
public Part getPart(String name) throws IOException,
@@ -326,10 +353,15 @@ public class HttpServletRequestWrapper e
/**
* {@inheritDoc}
+ * <p>
+ * The default behavior of this method is to return
+ * {@link HttpServletRequest#upgrade(ProtocolHandler)}
+ * on the wrapped request object.
+ *
+ * @since Servlet 3.1
*/
@Override
- public void upgrade(javax.servlet.http.ProtocolHandler handler)
- throws java.io.IOException {
+ public void upgrade(ProtocolHandler handler) throws java.io.IOException {
this._getHttpServletRequest().upgrade(handler);
}
}
Modified: tomcat/sandbox/trunk-resources/java/javax/servlet/http/HttpServletResponse.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/javax/servlet/http/HttpServletResponse.java?rev=1401253&r1=1401252&r2=1401253&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/javax/servlet/http/HttpServletResponse.java (original)
+++ tomcat/sandbox/trunk-resources/java/javax/servlet/http/HttpServletResponse.java Tue Oct 23 11:34:15 2012
@@ -29,8 +29,6 @@ import javax.servlet.ServletResponse;
* The servlet container creates an <code>HttpServletResponse</code> object and
* passes it as an argument to the servlet's service methods (<code>doGet</code>, <code>doPost</code>, etc).
*
- * @author Various
- * @version $Version$
* @see javax.servlet.ServletResponse
*/
public interface HttpServletResponse extends ServletResponse {
@@ -301,28 +299,38 @@ public interface HttpServletResponse ext
public void setStatus(int sc, String sm);
/**
- * @return TODO
- * @since Servlet 3.0 TODO SERVLET3 - Add comments
+ * Return the HTTP status code associated with this Response.
+ *
+ * @since Servlet 3.0
*/
public int getStatus();
/**
- * @param name
- * @return TODO
- * @since Servlet 3.0 TODO SERVLET3 - Add comments
+ * Return the value for the specified header, or <code>null</code> if this
+ * header has not been set. If more than one value was added for this
+ * name, only the first is returned; use {@link #getHeaders(String)} to
+ * retrieve all of them.
+ *
+ * @param name Header name to look up
+ *
+ * @since Servlet 3.0
*/
public String getHeader(String name);
/**
- * @param name
- * @return TODO
- * @since Servlet 3.0 TODO SERVLET3 - Add comments
+ * Return a Collection of all the header values associated with the
+ * specified header name.
+ *
+ * @param name Header name to look up
+ *
+ * @since Servlet 3.0
*/
public Collection<String> getHeaders(String name);
/**
- * @return TODO
- * @since Servlet 3.0 TODO SERVLET3 - Add comments
+ * Return an Iterable of all the header names set for this response.
+ *
+ * @since Servlet 3.0
*/
public Collection<String> getHeaderNames();
Modified: tomcat/sandbox/trunk-resources/java/javax/servlet/http/HttpServletResponseWrapper.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/javax/servlet/http/HttpServletResponseWrapper.java?rev=1401253&r1=1401252&r2=1401253&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/javax/servlet/http/HttpServletResponseWrapper.java (original)
+++ tomcat/sandbox/trunk-resources/java/javax/servlet/http/HttpServletResponseWrapper.java Tue Oct 23 11:34:15 2012
@@ -215,7 +215,13 @@ public class HttpServletResponseWrapper
}
/**
- * @since Servlet 3.0 TODO SERVLET3 - Add comments
+ * {@inheritDoc}
+ * <p>
+ * The default implementation is to call
+ * {@link HttpServletResponse#getStatus()}
+ * on the wrapper {@link HttpServletResponse}.
+ *
+ * @since Servlet 3.0
*/
@Override
public int getStatus() {
@@ -223,7 +229,13 @@ public class HttpServletResponseWrapper
}
/**
- * @since Servlet 3.0 TODO SERVLET3 - Add comments
+ * {@inheritDoc}
+ * <p>
+ * The default implementation is to call
+ * {@link HttpServletResponse#getHeader(String)}
+ * on the wrapper {@link HttpServletResponse}.
+ *
+ * @since Servlet 3.0
*/
@Override
public String getHeader(String name) {
@@ -231,7 +243,13 @@ public class HttpServletResponseWrapper
}
/**
- * @since Servlet 3.0 TODO SERVLET3 - Add comments
+ * {@inheritDoc}
+ * <p>
+ * The default implementation is to call
+ * {@link HttpServletResponse#getHeaders(String)}
+ * on the wrapper {@link HttpServletResponse}.
+ *
+ * @since Servlet 3.0
*/
@Override
public Collection<String> getHeaders(String name) {
@@ -239,7 +257,13 @@ public class HttpServletResponseWrapper
}
/**
- * @since Servlet 3.0 TODO SERVLET3 - Add comments
+ * {@inheritDoc}
+ * <p>
+ * The default implementation is to call
+ * {@link HttpServletResponse#getHeaderNames()}
+ * on the wrapper {@link HttpServletResponse}.
+ *
+ * @since Servlet 3.0
*/
@Override
public Collection<String> getHeaderNames() {
Modified: tomcat/sandbox/trunk-resources/java/javax/servlet/http/HttpSession.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/javax/servlet/http/HttpSession.java?rev=1401253&r1=1401252&r2=1401253&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/javax/servlet/http/HttpSession.java (original)
+++ tomcat/sandbox/trunk-resources/java/javax/servlet/http/HttpSession.java Tue Oct 23 11:34:15 2012
@@ -61,10 +61,7 @@ import javax.servlet.ServletContext;
* <code>ServletContext</code>), so information stored in one context will not
* be directly visible in another.
*
- * @author Various
- * @version $Version$
* @see HttpSessionBindingListener
- * @see HttpSessionContext
*/
public interface HttpSession {
Modified: tomcat/sandbox/trunk-resources/java/javax/servlet/http/LocalStrings.properties
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/javax/servlet/http/LocalStrings.properties?rev=1401253&r1=1401252&r2=1401253&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/javax/servlet/http/LocalStrings.properties (original)
+++ tomcat/sandbox/trunk-resources/java/javax/servlet/http/LocalStrings.properties Tue Oct 23 11:34:15 2012
@@ -18,7 +18,8 @@
err.cookie_name_is_token=Cookie name \"{0}\" is a reserved token
err.cookie_name_blank=Cookie name may not be null or zero length
-err.io.negativelength=Negative Length given in write method
+err.io.nullArray=Null passed for byte array in write method
+err.io.indexOutOfBounds=Invalid offset [{0}] and / or length [{1}] specified for array of size [{2}]
err.io.short_read=Short Read
http.method_not_implemented=Method {0} is not is not implemented by this servlet for this URI
Modified: tomcat/sandbox/trunk-resources/java/javax/servlet/http/ProtocolHandler.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/javax/servlet/http/ProtocolHandler.java?rev=1401253&r1=1401252&r2=1401253&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/javax/servlet/http/ProtocolHandler.java (original)
+++ tomcat/sandbox/trunk-resources/java/javax/servlet/http/ProtocolHandler.java Tue Oct 23 11:34:15 2012
@@ -15,10 +15,23 @@
* limitations under the License.
*/
package javax.servlet.http;
+
/**
- * TODO SERVLET 3.1
+ * Interface between the HTTP upgrade process and the new protocol.
*
+ * @since Servlet 3.1
*/
public interface ProtocolHandler {
- public abstract void init(javax.servlet.http.WebConnection connection);
+
+ /**
+ * This method is called once the request/response pair where
+ * {@link HttpServletRequest#upgrade(ProtocolHandler)} is called has
+ * completed processing and is the point where control of the connection
+ * passes from the container to the {@link ProtocolHandler}.
+ *
+ * @param connection The connection that has been upgraded
+ *
+ * @since Servlet 3.1
+ */
+ void init(WebConnection connection);
}
Modified: tomcat/sandbox/trunk-resources/java/javax/servlet/http/WebConnection.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/javax/servlet/http/WebConnection.java?rev=1401253&r1=1401252&r2=1401253&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/javax/servlet/http/WebConnection.java (original)
+++ tomcat/sandbox/trunk-resources/java/javax/servlet/http/WebConnection.java Tue Oct 23 11:34:15 2012
@@ -20,13 +20,28 @@ import java.io.IOException;
import javax.servlet.ServletInputStream;
import javax.servlet.ServletOutputStream;
+
/**
- * TODO SERVLET 3.1
+ * The interface used by a {@link ProtocolHandler} to interact with an upgraded
+ * HTTP connection.
*
+ * @since Servlet 3.1
*/
public interface WebConnection {
- public abstract ServletInputStream getInputStream()
- throws IOException;
- public abstract ServletOutputStream getOutputStream()
- throws IOException;
+
+ /**
+ * Provides access to the {@link ServletInputStream} for reading data from
+ * the client.
+ *
+ * @since Servlet 3.1
+ */
+ ServletInputStream getInputStream() throws IOException;
+
+ /**
+ * Provides access to the {@link ServletOutputStream} for writing data to
+ * the client.
+ *
+ * @since Servlet 3.1
+ */
+ ServletOutputStream getOutputStream() throws IOException;
}
\ No newline at end of file
Modified: tomcat/sandbox/trunk-resources/java/org/apache/catalina/connector/Connector.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/catalina/connector/Connector.java?rev=1401253&r1=1401252&r2=1401253&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/catalina/connector/Connector.java (original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/catalina/connector/Connector.java Tue Oct 23 11:34:15 2012
@@ -765,7 +765,11 @@ public class Connector extends Lifecycle
*/
public void setURIEncoding(String URIEncoding) {
this.URIEncoding = URIEncoding;
- this.URIEncodingLower = URIEncoding.toLowerCase(Locale.US);
+ if (URIEncoding == null) {
+ URIEncodingLower = null;
+ } else {
+ this.URIEncodingLower = URIEncoding.toLowerCase(Locale.US);
+ }
setProperty("uRIEncoding", URIEncoding);
}
Modified: tomcat/sandbox/trunk-resources/java/org/apache/catalina/connector/CoyoteInputStream.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/catalina/connector/CoyoteInputStream.java?rev=1401253&r1=1401252&r2=1401253&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/catalina/connector/CoyoteInputStream.java (original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/catalina/connector/CoyoteInputStream.java Tue Oct 23 11:34:15 2012
@@ -247,11 +247,6 @@ public class CoyoteInputStream
return ib.isFinished();
}
- @Override
- public int dataAvailable() {
- return ib.dataAvailable();
- }
-
@Override
public boolean isReady() {
@@ -266,6 +261,4 @@ public class CoyoteInputStream
public void setReadListener(ReadListener listener) {
ib.setReadListener(listener);
}
-
-
}
Modified: tomcat/sandbox/trunk-resources/java/org/apache/catalina/connector/InputBuffer.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/catalina/connector/InputBuffer.java?rev=1401253&r1=1401252&r2=1401253&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/catalina/connector/InputBuffer.java (original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/catalina/connector/InputBuffer.java Tue Oct 23 11:34:15 2012
@@ -248,41 +248,28 @@ public class InputBuffer extends Reader
return available;
}
+
private volatile ReadListener listener;
public void setReadListener(ReadListener listener) {
this.listener = listener;
coyoteRequest.action(ActionCode.SET_READ_LISTENER, listener);
}
+
public ReadListener getReadListener() {
return listener;
}
- public boolean isFinished() {
- return dataAvailable()==0;
- }
-
- public int dataAvailable() {
- if (getReadListener()==null) throw new IllegalStateException("not in non blocking mode.");
- int result = 0;
- //first check if we have buffered something already
- result = available();
-
- if(result <= 0) {
- //here we can issue a non blocking read
- //if supported
- //TODO SERVLET 3.1
- }
-
- return result;
+ public boolean isFinished() {
+ return available() == 0;
}
public boolean isReady() {
if (getReadListener()==null) throw new IllegalStateException("not in non blocking mode.");
- int available = dataAvailable();
- boolean result = available>0;
+ int available = available();
+ boolean result = available > 0;
if (!result) {
coyoteRequest.action(ActionCode.NB_READ_INTEREST, null);
}
@@ -290,13 +277,8 @@ public class InputBuffer extends Reader
}
-
-
-
-
// ------------------------------------------------- Bytes Handling Methods
-
/**
* Reads new bytes in the byte chunk.
*
Modified: tomcat/sandbox/trunk-resources/java/org/apache/catalina/connector/Response.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/catalina/connector/Response.java?rev=1401253&r1=1401252&r2=1401253&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/catalina/connector/Response.java (original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/catalina/connector/Response.java Tue Oct 23 11:34:15 2012
@@ -801,23 +801,12 @@ public class Response
// --------------------------------------------------- HttpResponse Methods
- /**
- * Return the value for the specified header, or <code>null</code> if this
- * header has not been set. If more than one value was added for this
- * name, only the first is returned; use {@link #getHeaders(String)} to
- * retrieve all of them.
- *
- * @param name Header name to look up
- */
@Override
public String getHeader(String name) {
return coyoteResponse.getMimeHeaders().getHeader(name);
}
- /**
- * Return an Iterable of all the header names set for this response.
- */
@Override
public Collection<String> getHeaderNames() {
@@ -832,12 +821,6 @@ public class Response
}
- /**
- * Return a Collection of all the header values associated with the
- * specified header name.
- *
- * @param name Header name to look up
- */
@Override
public Collection<String> getHeaders(String name) {
@@ -860,9 +843,6 @@ public class Response
}
- /**
- * Return the HTTP status code associated with this Response.
- */
@Override
public int getStatus() {
return coyoteResponse.getStatus();
Modified: tomcat/sandbox/trunk-resources/java/org/apache/catalina/core/AsyncContextImpl.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/catalina/core/AsyncContextImpl.java?rev=1401253&r1=1401252&r2=1401253&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/catalina/core/AsyncContextImpl.java (original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/catalina/core/AsyncContextImpl.java Tue Oct 23 11:34:15 2012
@@ -112,7 +112,7 @@ public class AsyncContextImpl implements
try {
Thread.currentThread().setContextClassLoader(newCL);
request.getCoyoteRequest().getReadListener().onDataAvailable();
- if (request.getInputStream().dataAvailable()==0) {
+ if (request.getInputStream().isFinished()) {
request.getCoyoteRequest().getReadListener().onAllDataRead();
}
}finally {
Modified: tomcat/sandbox/trunk-resources/java/org/apache/catalina/core/StandardWrapper.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/catalina/core/StandardWrapper.java?rev=1401253&r1=1401252&r2=1401253&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/catalina/core/StandardWrapper.java (original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/catalina/core/StandardWrapper.java Tue Oct 23 11:34:15 2012
@@ -1160,7 +1160,6 @@ public class StandardWrapper extends Con
/**
* {@inheritDoc}
- * @throws ClassNotFoundException
*/
@Override
public void servletSecurityAnnotationScan() throws ServletException {
Modified: tomcat/sandbox/trunk-resources/java/org/apache/catalina/filters/CsrfPreventionFilter.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/catalina/filters/CsrfPreventionFilter.java?rev=1401253&r1=1401252&r2=1401253&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/catalina/filters/CsrfPreventionFilter.java (original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/catalina/filters/CsrfPreventionFilter.java Tue Oct 23 11:34:15 2012
@@ -156,7 +156,6 @@ public class CsrfPreventionFilter extend
HttpSession session = req.getSession(false);
- @SuppressWarnings("unchecked")
LruCache<String> nonceCache = (session == null) ? null
: (LruCache<String>) session.getAttribute(
Constants.CSRF_NONCE_SESSION_ATTR_NAME);
Modified: tomcat/sandbox/trunk-resources/java/org/apache/catalina/ha/session/mbeans-descriptors.xml
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/catalina/ha/session/mbeans-descriptors.xml?rev=1401253&r1=1401252&r2=1401253&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/catalina/ha/session/mbeans-descriptors.xml (original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/catalina/ha/session/mbeans-descriptors.xml Tue Oct 23 11:34:15 2012
@@ -614,10 +614,10 @@
impact="ACTION"
returnType="java.lang.String"/>
<operation
- name="listSessionIdsFull"
- description="Return the list of active session ids"
+ name="getSessionIdsFull"
+ description="Returns the list of all sessions IDS (primary, backup and proxy)."
impact="ACTION"
- returnType="java.lang.String"/>
+ returnType="java.util.Set"/>
<operation
name="processExpires"
description="Invalidate all sessions that have expired.s"
Modified: tomcat/sandbox/trunk-resources/java/org/apache/catalina/mbeans/MBeanFactory.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/catalina/mbeans/MBeanFactory.java?rev=1401253&r1=1401252&r2=1401253&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/catalina/mbeans/MBeanFactory.java (original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/catalina/mbeans/MBeanFactory.java Tue Oct 23 11:34:15 2012
@@ -48,9 +48,6 @@ import org.apache.tomcat.util.res.String
/**
- * <p>A <strong>ModelMBean</strong> implementation for the
- * <code>org.apache.catalina.core.StandardServer</code> component.</p>
- *
* @author Amy Roh
* @version $Id$
*/
@@ -69,25 +66,6 @@ public class MBeanFactory {
private static final MBeanServer mserver = MBeanUtils.createServer();
- // ----------------------------------------------------------- Constructors
-
-
- /**
- * Construct a <code>ModelMBean</code> with default
- * <code>ModelMBeanInfo</code> information.
- *
- * @exception javax.management.MBeanException if the initializer of an
- * object throws an exception
- * @exception javax.management.RuntimeOperationsException if an
- * IllegalArgumentException occurs
- */
- public MBeanFactory() {
-
- super();
-
- }
-
-
// ------------------------------------------------------------- Attributes
/**
Modified: tomcat/sandbox/trunk-resources/java/org/apache/catalina/tribes/MembershipService.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/catalina/tribes/MembershipService.java?rev=1401253&r1=1401252&r2=1401253&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/catalina/tribes/MembershipService.java (original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/catalina/tribes/MembershipService.java Tue Oct 23 11:34:15 2012
@@ -67,7 +67,6 @@ public interface MembershipService {
* the listener will start to receive membership events.
* @param level - level MBR_RX stops listening for members, level MBR_TX
* stops broad casting the server
- * @throws java.lang.Exception if the service fails to stop
* @throws java.lang.IllegalArgumentException if the level is incorrect.
*/
Modified: tomcat/sandbox/trunk-resources/java/org/apache/catalina/tribes/transport/PooledSender.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/catalina/tribes/transport/PooledSender.java?rev=1401253&r1=1401252&r2=1401253&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/catalina/tribes/transport/PooledSender.java (original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/catalina/tribes/transport/PooledSender.java Tue Oct 23 11:34:15 2012
@@ -139,16 +139,11 @@ public abstract class PooledSender exten
public void setLimit(int limit) {
this.limit = limit;
}
- /**
- * @return
- */
+
public int getInUsePoolSize() {
return inuse.size();
}
- /**
- * @return
- */
public int getInPoolSize() {
return notinuse.size();
}
Modified: tomcat/sandbox/trunk-resources/java/org/apache/catalina/valves/AccessLogValve.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/catalina/valves/AccessLogValve.java?rev=1401253&r1=1401252&r2=1401253&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/catalina/valves/AccessLogValve.java (original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/catalina/valves/AccessLogValve.java Tue Oct 23 11:34:15 2012
@@ -46,6 +46,7 @@ import org.apache.catalina.AccessLog;
import org.apache.catalina.Globals;
import org.apache.catalina.LifecycleException;
import org.apache.catalina.LifecycleState;
+import org.apache.catalina.Session;
import org.apache.catalina.connector.Request;
import org.apache.catalina.connector.Response;
import org.apache.coyote.RequestInfo;
@@ -1860,15 +1861,15 @@ public class AccessLogValve extends Valv
@Override
public void addElement(CharArrayWriter buf, Date date, Request request,
Response response, long time) {
- if (request != null) {
- if (request.getSession(false) != null) {
- buf.append(request.getSessionInternal(false)
- .getIdInternal());
- } else {
+ if (request == null) {
+ buf.append('-');
+ } else {
+ Session session = request.getSessionInternal(false);
+ if (session == null) {
buf.append('-');
+ } else {
+ buf.append(session.getIdInternal());
}
- } else {
- buf.append('-');
}
}
}
Modified: tomcat/sandbox/trunk-resources/java/org/apache/coyote/AbstractProtocol.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/coyote/AbstractProtocol.java?rev=1401253&r1=1401252&r2=1401253&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/coyote/AbstractProtocol.java (original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/coyote/AbstractProtocol.java Tue Oct 23 11:34:15 2012
@@ -31,7 +31,6 @@ import javax.management.MalformedObjectN
import javax.management.ObjectName;
import org.apache.coyote.http11.upgrade.UpgradeInbound;
-import org.apache.coyote.http11.upgrade.UpgradeProcessor;
import org.apache.juli.logging.Log;
import org.apache.tomcat.util.ExceptionUtils;
import org.apache.tomcat.util.collections.SynchronizedStack;
@@ -651,8 +650,9 @@ public abstract class AbstractProtocol i
// Need to keep the connection associated with the processor
longPoll(socket, processor);
} else {
- // Connection closed. OK to recycle the processor.
- if (!(processor instanceof UpgradeProcessor)) {
+ // Connection closed. OK to recycle the processor. Upgrade
+ // processors are not recycled.
+ if (!processor.isUpgrade()) {
release(socket, processor, true, false);
}
}
@@ -678,7 +678,7 @@ public abstract class AbstractProtocol i
sm.getString("abstractConnectionHandler.error"), e);
}
// Don't try to add upgrade processors back into the pool
- if (!(processor instanceof UpgradeProcessor)) {
+ if (processor !=null && !processor.isUpgrade()) {
release(socket, processor, true, false);
}
return SocketState.CLOSED;
@@ -759,6 +759,7 @@ public abstract class AbstractProtocol i
this.handler = handler;
}
+ @SuppressWarnings("sync-override") // Size may exceed cache size a bit
@Override
public boolean push(Processor<S> processor) {
int cacheSize = handler.getProtocol().getProcessorCache();
@@ -775,6 +776,7 @@ public abstract class AbstractProtocol i
return result;
}
+ @SuppressWarnings("sync-override") // OK if size is too big briefly
@Override
public Processor<S> pop() {
Processor<S> result = super.pop();
Modified: tomcat/sandbox/trunk-resources/java/org/apache/coyote/ajp/AbstractAjpProcessor.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/coyote/ajp/AbstractAjpProcessor.java?rev=1401253&r1=1401252&r2=1401253&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/coyote/ajp/AbstractAjpProcessor.java (original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/coyote/ajp/AbstractAjpProcessor.java Tue Oct 23 11:34:15 2012
@@ -768,20 +768,17 @@ public abstract class AbstractAjpProcess
break;
case Constants.SC_A_SSL_CERT :
- request.scheme().setString("https");
// SSL certificate extraction is lazy, moved to JkCoyoteHandler
requestHeaderMessage.getBytes(certificates);
break;
case Constants.SC_A_SSL_CIPHER :
- request.scheme().setString("https");
requestHeaderMessage.getBytes(tmpMB);
request.setAttribute(SSLSupport.CIPHER_SUITE_KEY,
tmpMB.toString());
break;
case Constants.SC_A_SSL_SESSION :
- request.scheme().setString("https");
requestHeaderMessage.getBytes(tmpMB);
request.setAttribute(SSLSupport.SESSION_ID_KEY,
tmpMB.toString());
Modified: tomcat/sandbox/trunk-resources/java/org/apache/coyote/ajp/AjpAprProtocol.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/coyote/ajp/AjpAprProtocol.java?rev=1401253&r1=1401252&r2=1401253&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/coyote/ajp/AjpAprProtocol.java (original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/coyote/ajp/AjpAprProtocol.java Tue Oct 23 11:34:15 2012
@@ -135,7 +135,8 @@ public class AjpAprProtocol extends Abst
if (addToPoller) {
((AprEndpoint)proto.endpoint).getPoller().add(
socket.getSocket().longValue(),
- proto.endpoint.getKeepAliveTimeout());
+ proto.endpoint.getKeepAliveTimeout(),
+ AprEndpoint.Poller.FLAGS_READ);
}
}
Modified: tomcat/sandbox/trunk-resources/java/org/apache/coyote/http11/Http11AprProtocol.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/coyote/http11/Http11AprProtocol.java?rev=1401253&r1=1401252&r2=1401253&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/coyote/http11/Http11AprProtocol.java (original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/coyote/http11/Http11AprProtocol.java Tue Oct 23 11:34:15 2012
@@ -251,7 +251,8 @@ public class Http11AprProtocol extends A
if (addToPoller && proto.endpoint.isRunning()) {
((AprEndpoint)proto.endpoint).getPoller().add(
socket.getSocket().longValue(),
- proto.endpoint.getKeepAliveTimeout());
+ proto.endpoint.getKeepAliveTimeout(),
+ AprEndpoint.Poller.FLAGS_READ);
}
}
@@ -296,7 +297,8 @@ public class Http11AprProtocol extends A
if (proto.endpoint.isRunning()) {
((AprEndpoint) proto.endpoint).getCometPoller().add(
socket.getSocket().longValue(),
- proto.endpoint.getSoTimeout());
+ proto.endpoint.getSoTimeout(),
+ AprEndpoint.Poller.FLAGS_READ);
} else {
// Process a STOP directly
((AprEndpoint) proto.endpoint).processSocket(
@@ -307,7 +309,8 @@ public class Http11AprProtocol extends A
// Upgraded
((AprEndpoint) proto.endpoint).getPoller().add(
socket.getSocket().longValue(),
- (processor.getUpgradeInbound().getReadTimeout()));
+ processor.getUpgradeInbound().getReadTimeout(),
+ AprEndpoint.Poller.FLAGS_READ);
}
}
Modified: tomcat/sandbox/trunk-resources/java/org/apache/coyote/http11/upgrade/UpgradeNioProcessor.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/coyote/http11/upgrade/UpgradeNioProcessor.java?rev=1401253&r1=1401252&r2=1401253&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/coyote/http11/upgrade/UpgradeNioProcessor.java (original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/coyote/http11/upgrade/UpgradeNioProcessor.java Tue Oct 23 11:34:15 2012
@@ -18,6 +18,7 @@ package org.apache.coyote.http11.upgrade
import java.io.EOFException;
import java.io.IOException;
+import java.nio.ByteBuffer;
import java.nio.channels.Selector;
import org.apache.tomcat.util.net.NioChannel;
@@ -120,9 +121,52 @@ public class UpgradeNioProcessor extends
private int readSocket(boolean block, byte[] bytes, int offset, int len)
throws IOException {
- int nRead = 0;
- nioChannel.getBufHandler().getReadBuffer().clear();
- nioChannel.getBufHandler().getReadBuffer().limit(len);
+ ByteBuffer readBuffer = nioChannel.getBufHandler().getReadBuffer();
+ int remaining = readBuffer.remaining();
+
+ // Is there enough data in the read buffer to satisfy this request?
+ if (remaining >= len) {
+ readBuffer.get(bytes, offset, len);
+ return len;
+ }
+
+ // Copy what data there is in the read buffer to the byte array
+ int leftToWrite = len;
+ int newOffset = offset;
+ if (remaining > 0) {
+ readBuffer.get(bytes, offset, remaining);
+ leftToWrite -= remaining;
+ newOffset += remaining;
+ }
+
+ // Fill the read buffer as best we can
+ readBuffer.clear();
+ int nRead = fillReadBuffer(block);
+
+ // Full as much of the remaining byte array as possible with the data
+ // that was just read
+ if (nRead > 0) {
+ readBuffer.flip();
+ readBuffer.limit(nRead);
+ if (nRead > leftToWrite) {
+ readBuffer.get(bytes, newOffset, leftToWrite);
+ leftToWrite = 0;
+ } else {
+ readBuffer.get(bytes, newOffset, nRead);
+ leftToWrite -= nRead;
+ }
+ } else if (nRead == 0) {
+ readBuffer.flip();
+ readBuffer.limit(nRead);
+ } else if (nRead == -1) {
+ throw new EOFException(sm.getString("nio.eof.error"));
+ }
+
+ return len - leftToWrite;
+ }
+
+ private int fillReadBuffer(boolean block) throws IOException {
+ int nRead;
if (block) {
Selector selector = null;
try {
@@ -148,20 +192,9 @@ public class UpgradeNioProcessor extends
} else {
nRead = nioChannel.read(nioChannel.getBufHandler().getReadBuffer());
}
- if (nRead > 0) {
- nioChannel.getBufHandler().getReadBuffer().flip();
- nioChannel.getBufHandler().getReadBuffer().limit(nRead);
- nioChannel.getBufHandler().getReadBuffer().get(bytes, offset, nRead);
- return nRead;
- } else if (nRead == -1) {
- //return false;
- throw new EOFException(sm.getString("nio.eof.error"));
- } else {
- return 0;
- }
+ return nRead;
}
-
/*
* Adapted from the NioOutputBuffer
*/
Modified: tomcat/sandbox/trunk-resources/java/org/apache/jasper/compiler/JspReader.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/jasper/compiler/JspReader.java?rev=1401253&r1=1401252&r2=1401253&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/jasper/compiler/JspReader.java (original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/jasper/compiler/JspReader.java Tue Oct 23 11:34:15 2012
@@ -426,7 +426,7 @@ class JspReader {
if (peekChar() == limit.charAt(i)) {
nextChar();
} else {
- setCurrent(restart);
+ current.init(restart, singleFile);
continue skip;
}
}
Propchange: tomcat/sandbox/trunk-resources/java/org/apache/tomcat/util/bcel/
------------------------------------------------------------------------------
Merged /tomcat/trunk/java/org/apache/tomcat/util/bcel:r1384081-1401252
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
|