Author: markt Date: Fri Jan 10 11:04:08 2014 New Revision: 1557082 URL: http://svn.apache.org/r1557082 Log: Fix failures in newly added tests
Modified: tomcat/trunk/java/org/apache/coyote/http11/upgrade/AbstractServletInputStream.java tomcat/trunk/java/org/apache/coyote/http11/upgrade/AbstractServletOutputStream.java tomcat/trunk/java/org/apache/coyote/http11/upgrade/LocalStrings.properties Modified: tomcat/trunk/java/org/apache/coyote/http11/upgrade/AbstractServletInputStream.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/upgrade/AbstractServletInputStream.java?rev=1557082&r1=1557081&r2=1557082&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/coyote/http11/upgrade/AbstractServletInputStream.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/upgrade/AbstractServletInputStream.java Fri Jan 10 11:04:08 2014 @@ -81,6 +81,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/trunk/java/org/apache/coyote/http11/upgrade/AbstractServletOutputStream.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/upgrade/AbstractServletOutputStream.java?rev=1557082&r1=1557081&r2=1557082&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/coyote/http11/upgrade/AbstractServletOutputStream.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/upgrade/AbstractServletOutputStream.java Fri Jan 10 11:04:08 2014 @@ -61,6 +61,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/trunk/java/org/apache/coyote/http11/upgrade/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/upgrade/LocalStrings.properties?rev=1557082&r1=1557081&r2=1557082&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/coyote/http11/upgrade/LocalStrings.properties (original) +++ tomcat/trunk/java/org/apache/coyote/http11/upgrade/LocalStrings.properties Fri Jan 10 11:04:08 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