tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1519799 - in /tomcat/trunk/java/org/apache/catalina/connector: CoyoteInputStream.java CoyoteOutputStream.java
Date Tue, 03 Sep 2013 19:06:53 GMT
Author: markt
Date: Tue Sep  3 19:06:52 2013
New Revision: 1519799

URL: http://svn.apache.org/r1519799
Log:
Revert r1519798
I realised it wouldn't work just as I hit commit.

Modified:
    tomcat/trunk/java/org/apache/catalina/connector/CoyoteInputStream.java
    tomcat/trunk/java/org/apache/catalina/connector/CoyoteOutputStream.java

Modified: tomcat/trunk/java/org/apache/catalina/connector/CoyoteInputStream.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/CoyoteInputStream.java?rev=1519799&r1=1519798&r2=1519799&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/connector/CoyoteInputStream.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/CoyoteInputStream.java Tue Sep  3 19:06:52
2013
@@ -40,7 +40,6 @@ public class CoyoteInputStream extends S
 
 
     protected InputBuffer ib;
-    private volatile Boolean ready = null;
 
 
     protected CoyoteInputStream(InputBuffer ib) {
@@ -241,8 +240,7 @@ public class CoyoteInputStream extends S
 
     @Override
     public boolean isReady() {
-        ready = Boolean.valueOf(ib.isReady());
-        return ready.booleanValue();
+        return ib.isReady();
     }
 
 
@@ -253,10 +251,9 @@ public class CoyoteInputStream extends S
 
 
     private void checkNonBlockingRead() {
-        if (ib.isBlocking() && (ready == null || !ready.booleanValue())) {
+        if (ib.isBlocking() && !ib.isReady()) {
             throw new IllegalStateException(
                     sm.getString("coyoteInputStream.nbNotready"));
         }
-        ready = null;
     }
 }

Modified: tomcat/trunk/java/org/apache/catalina/connector/CoyoteOutputStream.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/CoyoteOutputStream.java?rev=1519799&r1=1519798&r2=1519799&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/connector/CoyoteOutputStream.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/CoyoteOutputStream.java Tue Sep  3 19:06:52
2013
@@ -35,8 +35,12 @@ public class CoyoteOutputStream extends 
             StringManager.getManager(Constants.Package);
 
 
+    // ----------------------------------------------------- Instance Variables
+
     protected OutputBuffer ob;
-    private volatile Boolean ready = null;
+
+
+    // ----------------------------------------------------------- Constructors
 
 
     protected CoyoteOutputStream(OutputBuffer ob) {
@@ -44,15 +48,22 @@ public class CoyoteOutputStream extends 
     }
 
 
+    // --------------------------------------------------------- Public Methods
+
+
     /**
      * Prevent cloning the facade.
      */
     @Override
-    protected Object clone() throws CloneNotSupportedException {
+    protected Object clone()
+        throws CloneNotSupportedException {
         throw new CloneNotSupportedException();
     }
 
 
+    // -------------------------------------------------------- Package Methods
+
+
     /**
      * Clear facade.
      */
@@ -61,6 +72,9 @@ public class CoyoteOutputStream extends 
     }
 
 
+    // --------------------------------------------------- OutputStream Methods
+
+
     @Override
     public void write(int i) throws IOException {
         boolean nonBlocking = checkNonBlockingWrite();
@@ -110,11 +124,10 @@ public class CoyoteOutputStream extends 
      */
     private boolean checkNonBlockingWrite() {
         boolean nonBlocking = !ob.isBlocking();
-        if (nonBlocking && (ready == null || !ready.booleanValue())) {
+        if (nonBlocking && !ob.isReady()) {
             throw new IllegalStateException(
                     sm.getString("coyoteOutputStream.nbNotready"));
         }
-        ready = null;
         return nonBlocking;
     }
 
@@ -140,8 +153,7 @@ public class CoyoteOutputStream extends 
 
     @Override
     public boolean isReady() {
-        ready = Boolean.valueOf(ob.isReady());
-        return ready.booleanValue();
+        return ob.isReady();
     }
 
 



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


Mime
View raw message