hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r690361 - in /httpcomponents/httpcore/trunk/module-nio/src: main/java/org/apache/http/nio/protocol/ main/java/org/apache/http/nio/util/ test/java/org/apache/http/nio/protocol/
Date Fri, 29 Aug 2008 18:35:30 GMT
Author: olegk
Date: Fri Aug 29 11:35:29 2008
New Revision: 690361

URL: http://svn.apache.org/viewvc?rev=690361&view=rev
Log:
Changed #close method() of the Shared*Buffer classes to not throw IOException

Modified:
    httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/ThrottlingHttpClientHandler.java
    httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/ThrottlingHttpServiceHandler.java
    httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/util/SharedInputBuffer.java
    httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/util/SharedOutputBuffer.java
    httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/nio/protocol/TestThrottlingNHttpHandlers.java

Modified: httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/ThrottlingHttpClientHandler.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/ThrottlingHttpClientHandler.java?rev=690361&r1=690360&r2=690361&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/ThrottlingHttpClientHandler.java
(original)
+++ httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/ThrottlingHttpClientHandler.java
Fri Aug 29 11:35:29 2008
@@ -637,14 +637,8 @@
         }
 
         public void close() {
-            try {
-                this.inbuffer.close();
-            } catch (IOException ignore) {
-            }
-            try {
-                this.outbuffer.close();
-            } catch (IOException ignore) {
-            }
+            this.inbuffer.close();
+            this.outbuffer.close();
             this.inputState = SHUTDOWN;
             this.outputState = SHUTDOWN;
         }

Modified: httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/ThrottlingHttpServiceHandler.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/ThrottlingHttpServiceHandler.java?rev=690361&r1=690360&r2=690361&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/ThrottlingHttpServiceHandler.java
(original)
+++ httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/ThrottlingHttpServiceHandler.java
Fri Aug 29 11:35:29 2008
@@ -688,14 +688,8 @@
         }
 
         public void close() {
-            try {
-                this.inbuffer.close();
-            } catch (IOException ignore) {
-            }
-            try {
-                this.outbuffer.close();
-            } catch (IOException ignore) {
-            }
+            this.inbuffer.close();
+            this.outbuffer.close();
             this.inputState = SHUTDOWN;
             this.outputState = SHUTDOWN;
         }

Modified: httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/util/SharedInputBuffer.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/util/SharedInputBuffer.java?rev=690361&r1=690360&r2=690361&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/util/SharedInputBuffer.java
(original)
+++ httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/util/SharedInputBuffer.java
Fri Aug 29 11:35:29 2008
@@ -110,7 +110,7 @@
         }
     }
 
-    public void close() throws IOException {
+    public void close() {
         if (this.shutdown) {
             return;
         }

Modified: httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/util/SharedOutputBuffer.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/util/SharedOutputBuffer.java?rev=690361&r1=690360&r2=690361&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/util/SharedOutputBuffer.java
(original)
+++ httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/util/SharedOutputBuffer.java
Fri Aug 29 11:35:29 2008
@@ -93,11 +93,15 @@
         }
     }
     
-    public void close() throws IOException {
+    public void close() {
         if (this.shutdown) {
             return;
         }
-        writeCompleted();
+        try {
+            writeCompleted();
+        } catch (IOException ignore) {
+            // should never happen
+        }
     }
 
     public void shutdown() {

Modified: httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/nio/protocol/TestThrottlingNHttpHandlers.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/nio/protocol/TestThrottlingNHttpHandlers.java?rev=690361&r1=690360&r2=690361&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/nio/protocol/TestThrottlingNHttpHandlers.java
(original)
+++ httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/nio/protocol/TestThrottlingNHttpHandlers.java
Fri Aug 29 11:35:29 2008
@@ -32,7 +32,6 @@
 
 import java.io.IOException;
 import java.io.InputStream;
-import java.io.InterruptedIOException;
 import java.io.PipedInputStream;
 import java.io.PipedOutputStream;
 import java.net.InetSocketAddress;



Mime
View raw message