cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject cxf git commit: [CXF-7357] UnknownHostException not thrown during POST request This closes #291
Date Fri, 28 Jul 2017 19:17:51 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 0fbd966c8 -> 043247acc


[CXF-7357] UnknownHostException not thrown during POST request
This closes #291


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/043247ac
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/043247ac
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/043247ac

Branch: refs/heads/master
Commit: 043247acc19085d551b4b997874ec7fc3247d206
Parents: 0fbd966
Author: Dennis Kieselhorst <deki@apache.org>
Authored: Wed Jul 5 15:55:43 2017 +0200
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Fri Jul 28 15:17:28 2017 -0400

----------------------------------------------------------------------
 .../cxf/transport/http/asyncclient/AsyncHTTPConduit.java     | 8 +++++++-
 .../cxf/systest/jaxrs/JAXRS20ClientServerBookTest.java       | 2 --
 2 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/043247ac/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java
b/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java
index 90c26c3..4c70761 100755
--- a/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java
+++ b/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java
@@ -347,7 +347,7 @@ public class AsyncHTTPConduit extends URLConnectionHTTPConduit {
         }
 
         public boolean isOpen() {
-            return true;
+            return !closed;
         }
 
         public int write(ByteBuffer src) throws IOException {
@@ -428,9 +428,15 @@ public class AsyncHTTPConduit extends URLConnectionHTTPConduit {
             connect(true);
             wrappedStream = new OutputStream() {
                 public void write(byte b[], int off, int len) throws IOException {
+                    if (exception instanceof IOException) {
+                        throw (IOException) exception;
+                    }
                     outbuf.write(b, off, len);
                 }
                 public void write(int b) throws IOException {
+                    if (exception instanceof IOException) {
+                        throw (IOException) exception;
+                    }
                     outbuf.write(b);
                 }
                 public void close() throws IOException {

http://git-wip-us.apache.org/repos/asf/cxf/blob/043247ac/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRS20ClientServerBookTest.java
----------------------------------------------------------------------
diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRS20ClientServerBookTest.java
b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRS20ClientServerBookTest.java
index 583603c..14d81d4 100644
--- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRS20ClientServerBookTest.java
+++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRS20ClientServerBookTest.java
@@ -74,7 +74,6 @@ import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.BeforeClass;
-import org.junit.Ignore;
 import org.junit.Test;
 
 public class JAXRS20ClientServerBookTest extends AbstractBusClientServerTestBase {
@@ -793,7 +792,6 @@ public class JAXRS20ClientServerBookTest extends AbstractBusClientServerTestBase
         assertEquals("CXF Rocks", b22.getName());
     }
 
-    @Ignore("CXF-7357")
     @Test
     public void testUnknownHostException() throws InterruptedException {
         String address = "http://unknown-host/bookstore/bookheaders/simple/async";


Mime
View raw message