tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1460669 - in /tomcat/trunk/java: javax/servlet/ org/apache/catalina/core/ org/apache/coyote/http11/upgrade/
Date Mon, 25 Mar 2013 14:05:25 GMT
Author: markt
Date: Mon Mar 25 14:05:25 2013
New Revision: 1460669

URL: http://svn.apache.org/r1460669
Log:
Partial fox for https://issues.apache.org/bugzilla/show_bug.cgi?id=54734
Add new throws
Based on a patch by Nick Williams

Modified:
    tomcat/trunk/java/javax/servlet/ReadListener.java
    tomcat/trunk/java/javax/servlet/WriteListener.java
    tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java
    tomcat/trunk/java/org/apache/coyote/http11/upgrade/AbstractServletInputStream.java
    tomcat/trunk/java/org/apache/coyote/http11/upgrade/AbstractServletOutputStream.java

Modified: tomcat/trunk/java/javax/servlet/ReadListener.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/ReadListener.java?rev=1460669&r1=1460668&r2=1460669&view=diff
==============================================================================
--- tomcat/trunk/java/javax/servlet/ReadListener.java (original)
+++ tomcat/trunk/java/javax/servlet/ReadListener.java Mon Mar 25 14:05:25 2013
@@ -15,12 +15,15 @@
  * limitations under the License.
  */
 package javax.servlet;
+
+import java.io.IOException;
+
 /**
  * TODO SERVLET 3.1
  *
  */
 public interface ReadListener extends java.util.EventListener{
-    public abstract void onDataAvailable();
-    public abstract void onAllDataRead();
+    public abstract void onDataAvailable() throws IOException;
+    public abstract void onAllDataRead() throws IOException;
     public abstract void onError(java.lang.Throwable throwable);
 }

Modified: tomcat/trunk/java/javax/servlet/WriteListener.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/WriteListener.java?rev=1460669&r1=1460668&r2=1460669&view=diff
==============================================================================
--- tomcat/trunk/java/javax/servlet/WriteListener.java (original)
+++ tomcat/trunk/java/javax/servlet/WriteListener.java Mon Mar 25 14:05:25 2013
@@ -16,11 +16,13 @@
  */
 package javax.servlet;
 
+import java.io.IOException;
+
 /**
  * TODO SERVLET 3.1
  *
  */
 public interface WriteListener extends java.util.EventListener{
-    public void onWritePossible();
+    public void onWritePossible() throws IOException;
     public void onError(java.lang.Throwable throwable);
 }
\ No newline at end of file

Modified: tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java?rev=1460669&r1=1460668&r2=1460669&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java Mon Mar 25 14:05:25 2013
@@ -148,7 +148,7 @@ public class AsyncContextImpl implements
         return true;
     }
 
-    public boolean canWrite() {
+    public boolean canWrite() throws IOException {
         if (request.getResponse().getCoyoteResponse().getWriteListener()==null) return false;
         ClassLoader oldCL = Thread.currentThread().getContextClassLoader();
         ClassLoader newCL = request.getContext().getLoader().getClassLoader();

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=1460669&r1=1460668&r2=1460669&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/upgrade/AbstractServletInputStream.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/upgrade/AbstractServletInputStream.java Mon
Mar 25 14:05:25 2013
@@ -164,7 +164,7 @@ public abstract class AbstractServletInp
     }
 
 
-    protected final void onDataAvailable() {
+    protected final void onDataAvailable() throws IOException {
         ready = Boolean.TRUE;
         listener.onDataAvailable();
     }

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=1460669&r1=1460668&r2=1460669&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/upgrade/AbstractServletOutputStream.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/upgrade/AbstractServletOutputStream.java Mon
Mar 25 14:05:25 2013
@@ -125,14 +125,11 @@ public abstract class AbstractServletOut
     }
 
 
-    protected final void onWritePossible() {
+    protected final void onWritePossible() throws IOException {
         synchronized (writeLock) {
-            try {
-                writeInternal(buffer, 0, buffer.length);
-            } catch (IOException ioe) {
-                throw new RuntimeException(ioe);
-            }
-            // Make sure isReady() and onWritePossible() have a consistent view of
+            writeInternal(buffer, 0, buffer.length);
+
+           // Make sure isReady() and onWritePossible() have a consistent view of
             // buffer and fireListener when determining if the listener should fire
             boolean fire = false;
 



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


Mime
View raw message