cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject cxf git commit: Updates to build cleanly in Eclipse/Mars
Date Mon, 17 Aug 2015 19:05:36 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 17dbc1215 -> b48c79cc1


Updates to build cleanly in Eclipse/Mars


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

Branch: refs/heads/master
Commit: b48c79cc187d16a81e45be8a24e56437a0df56e3
Parents: 17dbc12
Author: Daniel Kulp <dkulp@apache.org>
Authored: Mon Aug 17 15:05:09 2015 -0400
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Mon Aug 17 15:05:09 2015 -0400

----------------------------------------------------------------------
 .../apache/cxf/jaxws/WrapperClassGenerator.java |   2 +-
 .../org/apache/cxf/jaxws/EndpointImplTest.java  |   2 +-
 .../cxf/jaxws/spring/SpringBeansTest.java       |   2 +-
 .../http/asyncclient/AsyncHTTPConduit.java      |   1 -
 .../spring/ApplicationContextTest.java          |   2 +-
 .../http/netty/client/NettyHttpConduit.java     |   1 -
 .../server/spring/ApplicationContextTest.java   |   2 +-
 .../apache/cxf/transport/http/ChunkedUtil.java  |   1 -
 .../apache/cxf/transport/udp/UDPConduit.java    | 134 +++++++++----------
 .../factory/ReflectionServiceFactoryBean.java   |   4 +-
 10 files changed, 72 insertions(+), 79 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/b48c79cc/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java
b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java
index 977b7dd..6141c86 100644
--- a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java
+++ b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java
@@ -347,7 +347,7 @@ public final class WrapperClassGenerator extends ASMHelper {
         if (!addJAXBAnnotations(fv, jaxbAnnos, name)) {
             AnnotationVisitor av0 = fv.visitAnnotation("Ljavax/xml/bind/annotation/XmlElement;",
true);
             av0.visit("name", name);
-            if (factory.isWrapperPartQualified(mpi)) {
+            if (Boolean.TRUE.equals(factory.isWrapperPartQualified(mpi))) {
                 av0.visit("namespace", mpi.getConcreteName().getNamespaceURI());        
   
             }
             if (factory.isWrapperPartNillable(mpi)) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/b48c79cc/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/EndpointImplTest.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/EndpointImplTest.java b/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/EndpointImplTest.java
index 40092d1..655ff0a 100644
--- a/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/EndpointImplTest.java
+++ b/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/EndpointImplTest.java
@@ -182,7 +182,7 @@ public class EndpointImplTest extends AbstractJaxWsTest {
         serviceFactory.setServiceClass(HelloWrongAnnotation.class);
         
         try {
-            new EndpointImpl(getBus(), hello, new JaxWsServerFactoryBean(serviceFactory));
+            new EndpointImpl(getBus(), hello, new JaxWsServerFactoryBean(serviceFactory)).close();
         } catch (Exception e) {
             String expeced = "Method [sayHi] processing error: SOAPBinding can not on method
with RPC style";
             assertEquals(expeced, e.getMessage());

http://git-wip-us.apache.org/repos/asf/cxf/blob/b48c79cc/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java
b/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java
index b68b96f..e38553b 100644
--- a/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java
+++ b/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java
@@ -437,7 +437,7 @@ public class SpringBeansTest extends Assert {
     @Test
     public void testEndpointWithUndefinedBus() throws Exception {
         try {
-            new ClassPathXmlApplicationContext("/org/apache/cxf/jaxws/spring/endpoints3.xml");
+            new ClassPathXmlApplicationContext("/org/apache/cxf/jaxws/spring/endpoints3.xml").close();
             fail("Should have thrown an exception");
         } catch (BeanCreationException ex) {
             assertEquals("ep2", ex.getBeanName());

http://git-wip-us.apache.org/repos/asf/cxf/blob/b48c79cc/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 f86c026..d8113e6 100644
--- 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
@@ -771,7 +771,6 @@ public class AsyncHTTPConduit extends URLConnectionHTTPConduit {
                 } else if (isChunked || isEofTerminated) {
                     // ensure chunked or EOF-terminated response is non-empty
                     try {
-                        @SuppressWarnings("resource")
                         PushbackInputStream pin = 
                             new PushbackInputStream(getInputStream());
                         int c = pin.read();

http://git-wip-us.apache.org/repos/asf/cxf/blob/b48c79cc/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/ApplicationContextTest.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/ApplicationContextTest.java
b/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/ApplicationContextTest.java
index 00a43ef..cf1f1a9 100644
--- a/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/ApplicationContextTest.java
+++ b/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/ApplicationContextTest.java
@@ -67,7 +67,7 @@ public class ApplicationContextTest extends Assert {
             .getResource("/org/apache/cxf/transport/http_jetty/spring/invalid-beans.xml").toString();
     
         try {
-            new TestApplicationContext(new String[] {S1, s4});
+            new TestApplicationContext(new String[] {S1, s4}).close();
             fail("Expected XmlBeanDefinitionStoreException not thrown.");
         } catch (XmlBeanDefinitionStoreException ex) {
             assertTrue(ex.getCause() instanceof SAXParseException);

http://git-wip-us.apache.org/repos/asf/cxf/blob/b48c79cc/rt/transports/http-netty/netty-client/src/main/java/org/apache/cxf/transport/http/netty/client/NettyHttpConduit.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-netty/netty-client/src/main/java/org/apache/cxf/transport/http/netty/client/NettyHttpConduit.java
b/rt/transports/http-netty/netty-client/src/main/java/org/apache/cxf/transport/http/netty/client/NettyHttpConduit.java
index 029d0d8..71e3870 100644
--- a/rt/transports/http-netty/netty-client/src/main/java/org/apache/cxf/transport/http/netty/client/NettyHttpConduit.java
+++ b/rt/transports/http-netty/netty-client/src/main/java/org/apache/cxf/transport/http/netty/client/NettyHttpConduit.java
@@ -518,7 +518,6 @@ public class NettyHttpConduit extends URLConnectionHTTPConduit implements
BusLif
                 } else if (isChunked || isEofTerminated) {
                     // ensure chunked or EOF-terminated response is non-empty
                     try {
-                        @SuppressWarnings("resource")
                         PushbackInputStream pin =
                                 new PushbackInputStream(getInputStream());
                         int c = pin.read();

http://git-wip-us.apache.org/repos/asf/cxf/blob/b48c79cc/rt/transports/http-netty/netty-server/src/test/java/org/apache/cxf/transport/http/netty/server/spring/ApplicationContextTest.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-netty/netty-server/src/test/java/org/apache/cxf/transport/http/netty/server/spring/ApplicationContextTest.java
b/rt/transports/http-netty/netty-server/src/test/java/org/apache/cxf/transport/http/netty/server/spring/ApplicationContextTest.java
index fe0f75f..75a8e46 100644
--- a/rt/transports/http-netty/netty-server/src/test/java/org/apache/cxf/transport/http/netty/server/spring/ApplicationContextTest.java
+++ b/rt/transports/http-netty/netty-server/src/test/java/org/apache/cxf/transport/http/netty/server/spring/ApplicationContextTest.java
@@ -67,7 +67,7 @@ public class ApplicationContextTest extends Assert {
             .getResource("/org/apache/cxf/transport/http/netty/server/spring/invalid-beans.xml").toString();
     
         try {
-            new TestApplicationContext(new String[] {S1, s4});
+            new TestApplicationContext(new String[] {S1, s4}).close();
             fail("Expected XmlBeanDefinitionStoreException not thrown.");
         } catch (XmlBeanDefinitionStoreException ex) {
             assertTrue(ex.getCause() instanceof SAXParseException);

http://git-wip-us.apache.org/repos/asf/cxf/blob/b48c79cc/rt/transports/http/src/main/java/org/apache/cxf/transport/http/ChunkedUtil.java
----------------------------------------------------------------------
diff --git a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/ChunkedUtil.java
b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/ChunkedUtil.java
index 96d2848..8ecc72f 100644
--- a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/ChunkedUtil.java
+++ b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/ChunkedUtil.java
@@ -83,7 +83,6 @@ final class ChunkedUtil {
     ) {
         InputStream in = null;
         try {
-            @SuppressWarnings("resource")
             PushbackInputStream pin = 
                 new PushbackInputStream(connection.getInputStream());
             int c = pin.read();

http://git-wip-us.apache.org/repos/asf/cxf/blob/b48c79cc/rt/transports/udp/src/main/java/org/apache/cxf/transport/udp/UDPConduit.java
----------------------------------------------------------------------
diff --git a/rt/transports/udp/src/main/java/org/apache/cxf/transport/udp/UDPConduit.java
b/rt/transports/udp/src/main/java/org/apache/cxf/transport/udp/UDPConduit.java
index ac79dcd..0326bb9 100644
--- a/rt/transports/udp/src/main/java/org/apache/cxf/transport/udp/UDPConduit.java
+++ b/rt/transports/udp/src/main/java/org/apache/cxf/transport/udp/UDPConduit.java
@@ -238,85 +238,81 @@ public class UDPConduit extends AbstractConduit {
 
         public void close() throws IOException {
             super.close();
-            DatagramSocket socket;
-            if (multicast != null) {
-                socket = new MulticastSocket(null);
-            } else {
-                socket = new DatagramSocket();
-            }
-            socket.setSendBufferSize(this.size());
-            socket.setReceiveBufferSize(64 * 1024);
-            socket.setBroadcast(true);
             
-            if (multicast == null) {
-                Enumeration<NetworkInterface> interfaces = NetworkInterface.getNetworkInterfaces();
-                while (interfaces.hasMoreElements()) {
-                    NetworkInterface networkInterface = interfaces.nextElement();
-                    if (!networkInterface.isUp() || networkInterface.isLoopback()) {
-                        continue;  
-                    }
-                    for (InterfaceAddress interfaceAddress : networkInterface.getInterfaceAddresses())
{
-                        InetAddress broadcast = interfaceAddress.getBroadcast();
-                        if (broadcast == null) {
-                            continue;
+            try (DatagramSocket socket = multicast != null ? new MulticastSocket(null) :
new DatagramSocket()) {
+                socket.setSendBufferSize(this.size());
+                socket.setReceiveBufferSize(64 * 1024);
+                socket.setBroadcast(true);
+                
+                if (multicast == null) {
+                    Enumeration<NetworkInterface> interfaces = NetworkInterface.getNetworkInterfaces();
+                    while (interfaces.hasMoreElements()) {
+                        NetworkInterface networkInterface = interfaces.nextElement();
+                        if (!networkInterface.isUp() || networkInterface.isLoopback()) {
+                            continue;  
                         }
-                        DatagramPacket sendPacket = new DatagramPacket(this.getRawBytes(),

-                                                                       0,
-                                                                       this.size(),
-                                                                       broadcast, 
-                                                                       port);
-                        
-                        try {
-                            socket.send(sendPacket);
-                        } catch (Exception e) {
-                            //ignore
+                        for (InterfaceAddress interfaceAddress : networkInterface.getInterfaceAddresses())
{
+                            InetAddress broadcast = interfaceAddress.getBroadcast();
+                            if (broadcast == null) {
+                                continue;
+                            }
+                            DatagramPacket sendPacket = new DatagramPacket(this.getRawBytes(),

+                                                                           0,
+                                                                           this.size(),
+                                                                           broadcast, 
+                                                                           port);
+                            
+                            try {
+                                socket.send(sendPacket);
+                            } catch (Exception e) {
+                                //ignore
+                            }
                         }
                     }
-                }
-            } else {
-                DatagramPacket sendPacket = new DatagramPacket(this.getRawBytes(), 
-                                                               0,
-                                                               this.size(),
-                                                               multicast);
-                
-                try {
-                    socket.send(sendPacket);
-                } catch (Exception e) {
-                    //ignore
-                }
-            }
-            
-            if (!message.getExchange().isOneWay()) {
-                byte bytes[] = new byte[64 * 1024];
-                DatagramPacket p = new DatagramPacket(bytes, bytes.length);
-                Object to = message.getContextualProperty(MULTI_RESPONSE_TIMEOUT);
-                Integer i = null;
-                if (to instanceof String) {
-                    i = Integer.parseInt((String)to);
-                } else if (to instanceof Integer) {
-                    i = (Integer)to;
-                }
-                if (i == null || i <= 0 || message.getExchange().isSynchronous()) {
-                    socket.setSoTimeout(30000);
-                    socket.receive(p);
-                    dataReceived(message, IoBuffer.wrap(bytes, 0, p.getLength()), false,
false);
                 } else {
-                    socket.setSoTimeout(i);
-                    boolean found = false;
+                    DatagramPacket sendPacket = new DatagramPacket(this.getRawBytes(), 
+                                                                   0,
+                                                                   this.size(),
+                                                                   multicast);
+                    
                     try {
-                        while (true) {
-                            socket.receive(p);
-                            dataReceived(message, IoBuffer.wrap(bytes, 0, p.getLength()),
false, true);
-                            found = true;
-                        }
-                    } catch (java.net.SocketTimeoutException ex) {
-                        if (!found) {
-                            throw ex;
+                        socket.send(sendPacket);
+                    } catch (Exception e) {
+                        //ignore
+                    }
+                }
+                
+                if (!message.getExchange().isOneWay()) {
+                    byte bytes[] = new byte[64 * 1024];
+                    DatagramPacket p = new DatagramPacket(bytes, bytes.length);
+                    Object to = message.getContextualProperty(MULTI_RESPONSE_TIMEOUT);
+                    Integer i = null;
+                    if (to instanceof String) {
+                        i = Integer.parseInt((String)to);
+                    } else if (to instanceof Integer) {
+                        i = (Integer)to;
+                    }
+                    if (i == null || i <= 0 || message.getExchange().isSynchronous())
{
+                        socket.setSoTimeout(30000);
+                        socket.receive(p);
+                        dataReceived(message, IoBuffer.wrap(bytes, 0, p.getLength()), false,
false);
+                    } else {
+                        socket.setSoTimeout(i);
+                        boolean found = false;
+                        try {
+                            while (true) {
+                                socket.receive(p);
+                                dataReceived(message, IoBuffer.wrap(bytes, 0, p.getLength()),
false, true);
+                                found = true;
+                            }
+                        } catch (java.net.SocketTimeoutException ex) {
+                            if (!found) {
+                                throw ex;
+                            }
                         }
                     }
                 }
             }
-            socket.close();
         }
 
         public void flush() throws IOException {

http://git-wip-us.apache.org/repos/asf/cxf/blob/b48c79cc/rt/wsdl/src/main/java/org/apache/cxf/wsdl/service/factory/ReflectionServiceFactoryBean.java
----------------------------------------------------------------------
diff --git a/rt/wsdl/src/main/java/org/apache/cxf/wsdl/service/factory/ReflectionServiceFactoryBean.java
b/rt/wsdl/src/main/java/org/apache/cxf/wsdl/service/factory/ReflectionServiceFactoryBean.java
index 23b84fa..75adeb4 100644
--- a/rt/wsdl/src/main/java/org/apache/cxf/wsdl/service/factory/ReflectionServiceFactoryBean.java
+++ b/rt/wsdl/src/main/java/org/apache/cxf/wsdl/service/factory/ReflectionServiceFactoryBean.java
@@ -2279,14 +2279,14 @@ public class ReflectionServiceFactoryBean extends org.apache.cxf.service.factory
         return null;
     }
 
-    public boolean isWrapperPartQualified(MessagePartInfo mpi) {
+    public Boolean isWrapperPartQualified(MessagePartInfo mpi) {
         for (AbstractServiceConfiguration c : serviceConfigurations) {
             Boolean b = c.isWrapperPartQualified(mpi);
             if (b != null) {
                 return b;
             }
         }
-        return false;
+        return null;
     }
     public boolean isWrapperPartNillable(MessagePartInfo mpi) {
         for (AbstractServiceConfiguration c : serviceConfigurations) {


Mime
View raw message