cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Minor update to JAXRS AbstractClient
Date Wed, 11 Feb 2015 21:30:05 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 76e1cd86b -> 1b91b6e63


Minor update to JAXRS AbstractClient


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

Branch: refs/heads/master
Commit: 1b91b6e630bec0980d94bd04b016748af525d9bd
Parents: 76e1cd8
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Wed Feb 11 21:29:48 2015 +0000
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Wed Feb 11 21:29:48 2015 +0000

----------------------------------------------------------------------
 .../java/org/apache/cxf/jaxrs/client/AbstractClient.java    | 4 +---
 .../org/apache/cxf/systest/jaxrs/JAXRSAsyncClientTest.java  | 9 ++++-----
 .../apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java | 5 ++---
 3 files changed, 7 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/1b91b6e6/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java
----------------------------------------------------------------------
diff --git a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java
index f87498d..62d725b 100644
--- a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java
+++ b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java
@@ -25,7 +25,6 @@ import java.io.OutputStream;
 import java.lang.annotation.Annotation;
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Type;
-import java.net.ConnectException;
 import java.net.HttpURLConnection;
 import java.net.URI;
 import java.text.SimpleDateFormat;
@@ -1065,8 +1064,7 @@ public abstract class AbstractClient implements Client {
 
         public void handleMessage(Message message) throws Fault {
             Exception ex = message.getContent(Exception.class);
-            if (!message.getExchange().isSynchronous() 
-                && ex instanceof ConnectException) {
+            if (!message.getExchange().isSynchronous()) {
                 //TODO: make sure it works with the failover feature
                 JaxrsClientCallback<?> cb = message.getExchange().get(JaxrsClientCallback.class);
                 cb.handleException(message, new ProcessingException(ex));

http://git-wip-us.apache.org/repos/asf/cxf/blob/1b91b6e6/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSAsyncClientTest.java
----------------------------------------------------------------------
diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSAsyncClientTest.java
b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSAsyncClientTest.java
index b3ae13c..5ab42e2 100644
--- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSAsyncClientTest.java
+++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSAsyncClientTest.java
@@ -24,7 +24,6 @@ import java.io.InputStream;
 import java.io.OutputStream;
 import java.lang.annotation.Annotation;
 import java.lang.reflect.Type;
-import java.net.ConnectException;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.concurrent.ExecutionException;
@@ -133,7 +132,7 @@ public class JAXRSAsyncClientTest extends AbstractBusClientServerTestBase
{
     
     @Test
     public void testNonExistent() throws Exception {
-        String address = "http://localhost/bookstore";
+        String address = "http://localhostt/bookstore";
         List<Object> providers = new ArrayList<Object>();
         providers.add(new TestResponseFilter());
         WebClient wc =  WebClient.create(address, providers);
@@ -144,14 +143,14 @@ public class JAXRSAsyncClientTest extends AbstractBusClientServerTestBase
{
         } catch (ExecutionException ex) {
             Throwable cause = ex.getCause();
             assertTrue(cause instanceof ProcessingException);
-            assertTrue(ex.getCause().getCause() instanceof ConnectException);
+            assertTrue(ex.getCause().getCause() instanceof IOException);
         } finally {
             wc.close();
         }
     }
     @Test
     public void testNonExistentJaxrs20() throws Exception {
-        String address = "http://localhost/bookstore";
+        String address = "http://localhostt/bookstore";
         Client c = ClientBuilder.newClient();
         c.register(new TestResponseFilter());
         WebTarget t1 = c.target(address);
@@ -162,7 +161,7 @@ public class JAXRSAsyncClientTest extends AbstractBusClientServerTestBase
{
         } catch (ExecutionException ex) {
             Throwable cause = ex.getCause();
             assertTrue(cause instanceof ProcessingException);
-            assertTrue(ex.getCause().getCause() instanceof ConnectException);
+            assertTrue(ex.getCause().getCause() instanceof IOException);
         } finally {
             c.close();
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/1b91b6e6/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java
----------------------------------------------------------------------
diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java
b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java
index 2dd23ab..d877768 100644
--- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java
+++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java
@@ -23,7 +23,6 @@ import java.io.ByteArrayInputStream;
 import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
-import java.net.ConnectException;
 import java.net.HttpURLConnection;
 import java.net.URL;
 import java.net.URLEncoder;
@@ -110,14 +109,14 @@ public class JAXRSClientServerBookTest extends AbstractBusClientServerTestBase
{
     }
     @Test
     public void testNonExistent() throws Exception {
-        String address = "http://localhost/bookstore";
+        String address = "http://localhostt/bookstore";
         WebClient wc = WebClient.create(address, 
                                         Collections.singletonList(new TestResponseFilter()));
         try {
             wc.get();
             fail();
         } catch (ProcessingException ex) {
-            assertTrue(ex.getCause() instanceof ConnectException);
+            assertTrue(ex.getCause() instanceof IOException);
         }
     }
     @Test


Mime
View raw message