Author: markt Date: Tue May 20 18:33:12 2014 New Revision: 1596356 URL: http://svn.apache.org/r1596356 Log: Backport of r1557082 Better align 7.0.x with trunk to aid back-ports
Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AbstractServletInputStream.java tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AbstractServletOutputStream.java tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/LocalStrings.properties Propchange: tomcat/tc7.0.x/trunk/ ------------------------------------------------------------------------------ Merged /tomcat/trunk:r1557082 Modified: tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AbstractServletInputStream.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AbstractServletInputStream.java?rev=1596356&r1=1596355&r2=1596356&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AbstractServletInputStream.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AbstractServletInputStream.java Tue May 20 18:33:12 2014 @@ -90,6 +90,10 @@ public abstract class AbstractServletInp throw new IllegalArgumentException( sm.getString("upgrade.sis.readListener.null")); } + if (this.listener != null) { + throw new IllegalArgumentException( + sm.getString("upgrade.sis.readListener.set")); + } this.listener = listener; this.applicationLoader = Thread.currentThread().getContextClassLoader(); // Switching to non-blocking. Don't know if data is available. Modified: tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AbstractServletOutputStream.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AbstractServletOutputStream.java?rev=1596356&r1=1596355&r2=1596356&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AbstractServletOutputStream.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AbstractServletOutputStream.java Tue May 20 18:33:12 2014 @@ -68,6 +68,10 @@ public abstract class AbstractServletOut throw new IllegalArgumentException( sm.getString("upgrade.sos.writeListener.null")); } + if (this.listener != null) { + throw new IllegalArgumentException( + sm.getString("upgrade.sos.writeListener.set")); + } this.listener = listener; this.applicationLoader = Thread.currentThread().getContextClassLoader(); } Modified: tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/LocalStrings.properties?rev=1596356&r1=1596355&r2=1596356&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/LocalStrings.properties (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/LocalStrings.properties Tue May 20 18:33:12 2014 @@ -19,9 +19,11 @@ abstractProcessor.osCloseFail=Failed to upgrade.sis.isFinished.ise=It is illegal to call isFinished() when the ServletInputStream is not in non-blocking mode (i.e. setReadListener() must be called first) upgrade.sis.isReady.ise=It is illegal to call isReady() when the ServletInputStream is not in non-blocking mode (i.e. setReadListener() must be called first) upgrade.sis.readListener.null=It is illegal to pass null to setReadListener() +upgrade.sis.readListener.set=It is illegal to call setReadListener() more than once for the same upgraded connection upgrade.sis.read.ise=It is illegal to call any of the read() methods in non-blocking mode without first checking that there is data available by calling isReady() upgrade.sos.canWrite.ise=It is illegal to call canWrite() when the ServletOutputStream is not in non-blocking mode (i.e. setWriteListener() must be called first) upgrade.sos.writeListener.null=It is illegal to pass null to setWriteListener() +upgrade.sos.writeListener.set=It is illegal to call setWriteListener() more than once for the same upgraded connection upgrade.sis.write.ise=It is illegal to call any of the write() methods in non-blocking mode without first checking that there is space available by calling isReady() apr.clientAbort=The client aborted the connection. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org