cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject cxf git commit: More compile warnings, remove some usage of deprecated things
Date Mon, 07 Aug 2017 15:35:59 GMT
Repository: cxf
Updated Branches:
  refs/heads/master ffccaf15e -> 925140208


More compile warnings, remove some usage of deprecated things


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

Branch: refs/heads/master
Commit: 925140208cec32341908100d44894d5993386fe9
Parents: ffccaf1
Author: Daniel Kulp <dkulp@apache.org>
Authored: Mon Aug 7 10:20:36 2017 -0400
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Mon Aug 7 10:20:53 2017 -0400

----------------------------------------------------------------------
 .../cxf/jca/outbound/CXFConnectionSpec.java     | 14 +++++------
 .../outbound/ManagedConnectionFactoryImpl.java  |  8 +++----
 .../jaxrs/client/spec/ClientBuilderImpl.java    |  4 ++--
 .../cxf/jaxrs/client/spec/ClientImpl.java       |  5 ++--
 .../client/spec/InvocationBuilderImpl.java      |  3 ++-
 .../provider/JPAOAuthDataProviderTest.java      |  1 +
 .../http/asyncclient/SharedInputBuffer.java     | 10 ++++----
 .../HTTPJettyTransportNamespaceHandler.java     |  3 +--
 .../client/NettyHttpClientPipelineFactory.java  |  3 +--
 .../netty/server/NettyHttpServerEngine.java     |  3 +--
 .../server/NettyHttpServletPipelineFactory.java |  3 +--
 .../HttpNettyTransportNamespaceHandler.java     |  3 +--
 .../http_undertow/UndertowHTTPDestination.java  |  3 +--
 .../http_undertow/UndertowHTTPServerEngine.java |  5 ++--
 .../HTTPUndertowTransportNamespaceHandler.java  |  3 +--
 .../transport/http/AbstractHTTPDestination.java | 12 ++++------
 .../apache/cxf/transport/http/HTTPConduit.java  | 21 +++++++---------
 .../org/apache/cxf/transport/http/Headers.java  | 25 +++++++-------------
 .../apache/cxf/transport/http/ProxyFactory.java | 10 ++++----
 .../cxf/transport/jms/JMSDestinationTest.java   |  1 +
 .../ws/security/wss4j/WSS4JInInterceptor.java   |  2 +-
 .../security/wss4j/WSS4JStaxInInterceptor.java  |  2 +-
 .../wss4j/WSS4JPrincipalInterceptor.java        |  6 ++---
 .../token/validator/jwt/JWTTokenValidator.java  |  3 +--
 .../org/apache/cxf/systest/jaxrs/BookStore.java |  1 -
 .../systest/outofband/header/OOBHeaderTest.java |  2 +-
 26 files changed, 66 insertions(+), 90 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/92514020/integration/jca/src/main/java/org/apache/cxf/jca/outbound/CXFConnectionSpec.java
----------------------------------------------------------------------
diff --git a/integration/jca/src/main/java/org/apache/cxf/jca/outbound/CXFConnectionSpec.java
b/integration/jca/src/main/java/org/apache/cxf/jca/outbound/CXFConnectionSpec.java
index a9ea17c..89e6730 100644
--- a/integration/jca/src/main/java/org/apache/cxf/jca/outbound/CXFConnectionSpec.java
+++ b/integration/jca/src/main/java/org/apache/cxf/jca/outbound/CXFConnectionSpec.java
@@ -19,11 +19,11 @@
 package org.apache.cxf.jca.outbound;
 
 import java.net.URL;
+import java.util.Objects;
 
 import javax.resource.spi.ConnectionRequestInfo;
 import javax.xml.namespace.QName;
 
-import org.apache.commons.lang3.ObjectUtils;
 
 /**
  *
@@ -124,27 +124,27 @@ public class CXFConnectionSpec implements ConnectionRequestInfo {
 
         CXFConnectionSpec that = (CXFConnectionSpec)other;
 
-        if (!ObjectUtils.equals(that.getWsdlURL(), wsdlURL)) {
+        if (!Objects.equals(that.getWsdlURL(), wsdlURL)) {
             return false;
         }
 
-        if (!ObjectUtils.equals(that.getBusConfigURL(), busConfigURL)) {
+        if (!Objects.equals(that.getBusConfigURL(), busConfigURL)) {
             return false;
         }
 
-        if (!ObjectUtils.equals(that.getServiceClass(), serviceClass)) {
+        if (!Objects.equals(that.getServiceClass(), serviceClass)) {
             return false;
         }
 
-        if (!ObjectUtils.equals(that.getServiceName(), serviceName)) {
+        if (!Objects.equals(that.getServiceName(), serviceName)) {
             return false;
         }
 
-        if (!ObjectUtils.equals(that.getEndpointName(), endpointName)) {
+        if (!Objects.equals(that.getEndpointName(), endpointName)) {
             return false;
         }
 
-        return ObjectUtils.equals(that.getAddress(), address);
+        return Objects.equals(that.getAddress(), address);
     }
 
     // Required by JCA Spec

http://git-wip-us.apache.org/repos/asf/cxf/blob/92514020/integration/jca/src/main/java/org/apache/cxf/jca/outbound/ManagedConnectionFactoryImpl.java
----------------------------------------------------------------------
diff --git a/integration/jca/src/main/java/org/apache/cxf/jca/outbound/ManagedConnectionFactoryImpl.java
b/integration/jca/src/main/java/org/apache/cxf/jca/outbound/ManagedConnectionFactoryImpl.java
index fc499d3..8aa6b39 100644
--- a/integration/jca/src/main/java/org/apache/cxf/jca/outbound/ManagedConnectionFactoryImpl.java
+++ b/integration/jca/src/main/java/org/apache/cxf/jca/outbound/ManagedConnectionFactoryImpl.java
@@ -21,6 +21,7 @@ package org.apache.cxf.jca.outbound;
 import java.io.PrintWriter;
 
 import java.util.Iterator;
+import java.util.Objects;
 import java.util.Set;
 import java.util.logging.Level;
 import java.util.logging.Logger;
@@ -35,7 +36,6 @@ import javax.resource.spi.ResourceAdapterAssociation;
 import javax.resource.spi.work.WorkManager;
 import javax.security.auth.Subject;
 
-import org.apache.commons.lang3.ObjectUtils;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.jca.core.logging.LoggerHelper;
 import org.apache.cxf.jca.cxf.ResourceAdapterImpl;
@@ -121,7 +121,7 @@ public class ManagedConnectionFactoryImpl implements ManagedConnectionFactory,
 
         ManagedConnectionFactoryImpl that = (ManagedConnectionFactoryImpl)o;
 
-        return ObjectUtils.equals(that.getBusConfigURL(), busConfigURL);
+        return Objects.equals(that.getBusConfigURL(), busConfigURL);
     }
 
     public PrintWriter getLogWriter() throws ResourceException {
@@ -156,12 +156,12 @@ public class ManagedConnectionFactoryImpl implements ManagedConnectionFactory,
 
             ManagedConnectionImpl mc = (ManagedConnectionImpl)obj;
 
-            if (!ObjectUtils.equals(busConfigURL,
+            if (!Objects.equals(busConfigURL,
                     mc.getManagedConnectionFactoryImpl().getBusConfigURL())) {
                 continue;
             }
 
-            if (!ObjectUtils.equals(reqInfo, mc.getRequestInfo())) {
+            if (!Objects.equals(reqInfo, mc.getRequestInfo())) {
                 continue;
             }
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/92514020/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spec/ClientBuilderImpl.java
----------------------------------------------------------------------
diff --git a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spec/ClientBuilderImpl.java
b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spec/ClientBuilderImpl.java
index 7c219b0..93f8034 100644
--- a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spec/ClientBuilderImpl.java
+++ b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spec/ClientBuilderImpl.java
@@ -35,7 +35,7 @@ import javax.ws.rs.client.ClientBuilder;
 import javax.ws.rs.core.Configurable;
 import javax.ws.rs.core.Configuration;
 
-import org.apache.cxf.jaxrs.client.WebClient;
+import org.apache.cxf.jaxrs.client.AbstractClient;
 
 public class ClientBuilderImpl extends ClientBuilder {
 
@@ -155,7 +155,7 @@ public class ClientBuilderImpl extends ClientBuilder {
 
     @Override
     public ClientBuilder executorService(ExecutorService executorService) {
-        return configImpl.property(WebClient.EXECUTOR_SERVICE_PROPERTY, executorService);
+        return configImpl.property(AbstractClient.EXECUTOR_SERVICE_PROPERTY, executorService);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cxf/blob/92514020/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spec/ClientImpl.java
----------------------------------------------------------------------
diff --git a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spec/ClientImpl.java b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spec/ClientImpl.java
index 36d9465..78f45f5 100644
--- a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spec/ClientImpl.java
+++ b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spec/ClientImpl.java
@@ -41,6 +41,7 @@ import javax.ws.rs.core.UriBuilder;
 
 import org.apache.cxf.common.util.SystemPropertyAction;
 import org.apache.cxf.configuration.jsse.TLSClientParameters;
+import org.apache.cxf.jaxrs.client.AbstractClient;
 import org.apache.cxf.jaxrs.client.ClientConfiguration;
 import org.apache.cxf.jaxrs.client.ClientProviderFactory;
 import org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean;
@@ -300,9 +301,9 @@ public class ClientImpl implements Client {
                 clientCfg.getHttpConduit().setTlsClientParameters(tlsParams);
             }
             // Executor for the asynchronous calls
-            Object executorServiceProp = configProps.get(WebClient.EXECUTOR_SERVICE_PROPERTY);
+            Object executorServiceProp = configProps.get(AbstractClient.EXECUTOR_SERVICE_PROPERTY);
             if (executorServiceProp != null) {
-                clientCfg.getResponseContext().put(WebClient.EXECUTOR_SERVICE_PROPERTY, executorServiceProp);
+                clientCfg.getResponseContext().put(AbstractClient.EXECUTOR_SERVICE_PROPERTY,
executorServiceProp);
             }
             setConnectionProperties(configProps, clientCfg);
             // CXF Features

http://git-wip-us.apache.org/repos/asf/cxf/blob/92514020/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spec/InvocationBuilderImpl.java
----------------------------------------------------------------------
diff --git a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spec/InvocationBuilderImpl.java
b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spec/InvocationBuilderImpl.java
index 31c6c9d..3eeecd2 100644
--- a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spec/InvocationBuilderImpl.java
+++ b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spec/InvocationBuilderImpl.java
@@ -46,6 +46,7 @@ import javax.ws.rs.ext.RuntimeDelegate;
 import javax.ws.rs.ext.RuntimeDelegate.HeaderDelegate;
 
 import org.apache.cxf.helpers.CastUtils;
+import org.apache.cxf.jaxrs.client.AbstractClient;
 import org.apache.cxf.jaxrs.client.WebClient;
 import org.apache.cxf.jaxrs.utils.HttpUtils;
 
@@ -390,7 +391,7 @@ public class InvocationBuilderImpl implements Invocation.Builder {
     }
 
     private ExecutorService getConfiguredExecutorService() {
-        return (ExecutorService)config.getProperty(WebClient.EXECUTOR_SERVICE_PROPERTY);
+        return (ExecutorService)config.getProperty(AbstractClient.EXECUTOR_SERVICE_PROPERTY);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/92514020/rt/rs/security/oauth-parent/oauth2/src/test/java/org/apache/cxf/rs/security/oauth2/provider/JPAOAuthDataProviderTest.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/test/java/org/apache/cxf/rs/security/oauth2/provider/JPAOAuthDataProviderTest.java
b/rt/rs/security/oauth-parent/oauth2/src/test/java/org/apache/cxf/rs/security/oauth2/provider/JPAOAuthDataProviderTest.java
index 23abcd1..076a431 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/test/java/org/apache/cxf/rs/security/oauth2/provider/JPAOAuthDataProviderTest.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/test/java/org/apache/cxf/rs/security/oauth2/provider/JPAOAuthDataProviderTest.java
@@ -203,6 +203,7 @@ public class JPAOAuthDataProviderTest extends Assert {
      * Checks that having multiple token each with its own
      * userSubject (but having same login) works.
      */
+    @SuppressWarnings("cast")
     @Test
     public void testAddGetDeleteMultipleAccessToken() {
         Client c = addClient("101", "bob");

http://git-wip-us.apache.org/repos/asf/cxf/blob/92514020/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/SharedInputBuffer.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/SharedInputBuffer.java
b/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/SharedInputBuffer.java
index 3fbd9dc..a2c52ca 100644
--- a/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/SharedInputBuffer.java
+++ b/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/SharedInputBuffer.java
@@ -115,13 +115,11 @@ public class SharedInputBuffer extends ExpandableBuffer {
 
             if (totalRead > 0) {
                 return totalRead;
-            } else {
-                if (this.endOfStream) {
-                    return -1;
-                } else {
-                    return 0;
-                }
             }
+            if (this.endOfStream) {
+                return -1;
+            }
+            return 0;
         } finally {
             this.lock.unlock();
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/92514020/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/HTTPJettyTransportNamespaceHandler.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/HTTPJettyTransportNamespaceHandler.java
b/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/HTTPJettyTransportNamespaceHandler.java
index 18f383e..1862173 100644
--- a/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/HTTPJettyTransportNamespaceHandler.java
+++ b/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/HTTPJettyTransportNamespaceHandler.java
@@ -48,9 +48,8 @@ public class HTTPJettyTransportNamespaceHandler extends BaseNamespaceHandler
{
         if (JETTY_TRANSPORT.equals(s)) {
             return getClass().getClassLoader().
                 getResource("schemas/configuration/http-jetty.xsd");
-        } else {
-            return super.findCoreSchemaLocation(s);
         }
+        return super.findCoreSchemaLocation(s);
     }
 
     @SuppressWarnings("rawtypes")

http://git-wip-us.apache.org/repos/asf/cxf/blob/92514020/rt/transports/http-netty/netty-client/src/main/java/org/apache/cxf/transport/http/netty/client/NettyHttpClientPipelineFactory.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-netty/netty-client/src/main/java/org/apache/cxf/transport/http/netty/client/NettyHttpClientPipelineFactory.java
b/rt/transports/http-netty/netty-client/src/main/java/org/apache/cxf/transport/http/netty/client/NettyHttpClientPipelineFactory.java
index c4b56f0..bc52ac7 100644
--- a/rt/transports/http-netty/netty-client/src/main/java/org/apache/cxf/transport/http/netty/client/NettyHttpClientPipelineFactory.java
+++ b/rt/transports/http-netty/netty-client/src/main/java/org/apache/cxf/transport/http/netty/client/NettyHttpClientPipelineFactory.java
@@ -73,9 +73,8 @@ public class NettyHttpClientPipelineFactory extends ChannelInitializer<Channel>
         if (tlsClientParameters != null) {
             SSLEngine sslEngine = SSLUtils.createClientSSLEngine(tlsClientParameters);
             return new SslHandler(sslEngine);
-        } else {
-            return null;
         }
+        return null;
     }
 
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/92514020/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/NettyHttpServerEngine.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/NettyHttpServerEngine.java
b/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/NettyHttpServerEngine.java
index 6dff4e6..b8547f6 100644
--- a/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/NettyHttpServerEngine.java
+++ b/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/NettyHttpServerEngine.java
@@ -226,9 +226,8 @@ public class NettyHttpServerEngine implements ServerEngine {
         NettyHttpContextHandler contextHandler = handlerMap.get(contextName);
         if (contextHandler != null) {
             return contextHandler.getNettyHttpHandler(url.getPath());
-        } else {
-            return null;
         }
+        return null;
     }
 
     public void shutdown() {

http://git-wip-us.apache.org/repos/asf/cxf/blob/92514020/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/NettyHttpServletPipelineFactory.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/NettyHttpServletPipelineFactory.java
b/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/NettyHttpServletPipelineFactory.java
index 5c27ae5..d3d0538 100644
--- a/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/NettyHttpServletPipelineFactory.java
+++ b/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/NettyHttpServletPipelineFactory.java
@@ -170,9 +170,8 @@ public class NettyHttpServletPipelineFactory extends ChannelInitializer<Channel>
         if (tlsServerParameters != null) {
             SSLEngine sslEngine = SSLUtils.createServerSSLEngine(tlsServerParameters);
             return new SslHandler(sslEngine);
-        } else {
-            return null;
         }
+        return null;
     }
 
     private class HttpSessionWatchdog implements Runnable {

http://git-wip-us.apache.org/repos/asf/cxf/blob/92514020/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/blueprint/HttpNettyTransportNamespaceHandler.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/blueprint/HttpNettyTransportNamespaceHandler.java
b/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/blueprint/HttpNettyTransportNamespaceHandler.java
index eaf0906..544fe65 100644
--- a/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/blueprint/HttpNettyTransportNamespaceHandler.java
+++ b/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/blueprint/HttpNettyTransportNamespaceHandler.java
@@ -47,9 +47,8 @@ public class HttpNettyTransportNamespaceHandler extends BaseNamespaceHandler
{
         if (NETTY_SERVER_TRANSPORT.equals(s)) {
             return getClass().getClassLoader().
                 getResource("schemas/configuration/http-netty-server.xsd");
-        } else {
-            return super.findCoreSchemaLocation(s);
         }
+        return super.findCoreSchemaLocation(s);
     }
 
     @SuppressWarnings("rawtypes")

http://git-wip-us.apache.org/repos/asf/cxf/blob/92514020/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/UndertowHTTPDestination.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/UndertowHTTPDestination.java
b/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/UndertowHTTPDestination.java
index b96c1b9..4a886c1 100644
--- a/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/UndertowHTTPDestination.java
+++ b/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/UndertowHTTPDestination.java
@@ -98,9 +98,8 @@ public class UndertowHTTPDestination extends ServletDestination {
                IOException {
         if (serverEngineFactory == null) {
             return;
-        } else { 
-            nurl = new URL(getAddress(endpointInfo));
         }
+        nurl = new URL(getAddress(endpointInfo));
         engine =
             serverEngineFactory.retrieveUndertowHTTPServerEngine(nurl.getPort());
         if (engine == null) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/92514020/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/UndertowHTTPServerEngine.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/UndertowHTTPServerEngine.java
b/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/UndertowHTTPServerEngine.java
index 26fafdd..2816b39 100644
--- a/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/UndertowHTTPServerEngine.java
+++ b/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/UndertowHTTPServerEngine.java
@@ -266,10 +266,9 @@ public class UndertowHTTPServerEngine implements ServerEngine {
             }
             Sequence<String> supportProtocols = Sequence.of(protocols);
             return result.setSocketOption(Options.SSL_ENABLED_PROTOCOLS, supportProtocols);
-        } else {
-            Sequence<String> supportProtocols = Sequence.of("TLSv1", "TLSv1.1", "TLSv1.2");
-            return result.setSocketOption(Options.SSL_ENABLED_PROTOCOLS, supportProtocols);
         }
+        Sequence<String> supportProtocols = Sequence.of("TLSv1", "TLSv1.1", "TLSv1.2");
+        return result.setSocketOption(Options.SSL_ENABLED_PROTOCOLS, supportProtocols);
     }
 
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/92514020/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/blueprint/HTTPUndertowTransportNamespaceHandler.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/blueprint/HTTPUndertowTransportNamespaceHandler.java
b/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/blueprint/HTTPUndertowTransportNamespaceHandler.java
index 0161869..a3359d2 100644
--- a/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/blueprint/HTTPUndertowTransportNamespaceHandler.java
+++ b/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/blueprint/HTTPUndertowTransportNamespaceHandler.java
@@ -48,9 +48,8 @@ public class HTTPUndertowTransportNamespaceHandler implements NamespaceHandler
{
         if (UNDERTOW_TRANSPORT.equals(s)) {
             return getClass().getClassLoader().
                 getResource("schemas/configuration/http-undertow.xsd");
-        } else {
-            return null;
         }
+        return null;
     }
 
     @SuppressWarnings("rawtypes")

http://git-wip-us.apache.org/repos/asf/cxf/blob/92514020/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
----------------------------------------------------------------------
diff --git a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
index 0f69d33..892e8f0 100644
--- a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
+++ b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
@@ -275,9 +275,8 @@ public abstract class AbstractHTTPDestination
             Throwable cause = ex.getCause();
             if (cause instanceof RuntimeException) {
                 throw (RuntimeException)cause;
-            } else {
-                throw ex;
             }
+            throw ex;
         } catch (RuntimeException ex) {
             throw ex;
         } finally {
@@ -666,12 +665,11 @@ public abstract class AbstractHTTPDestination
         Integer i = (Integer)message.get(Message.RESPONSE_CODE);
         if (i != null) {
             return i.intValue();
-        } else {
-            int code = hasNoResponseContent(message) ? HttpURLConnection.HTTP_ACCEPTED :
HttpURLConnection.HTTP_OK;
-            // put the code in the message so that others can get it
-            message.put(Message.RESPONSE_CODE, code);
-            return code;
         }
+        int code = hasNoResponseContent(message) ? HttpURLConnection.HTTP_ACCEPTED : HttpURLConnection.HTTP_OK;
+        // put the code in the message so that others can get it
+        message.put(Message.RESPONSE_CODE, code);
+        return code;
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/cxf/blob/92514020/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
----------------------------------------------------------------------
diff --git a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
index bbead08..cbf0e08 100644
--- a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
+++ b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
@@ -703,9 +703,8 @@ public abstract class HTTPConduit
         }
         if (defaultAddress == null) {
             return setAndGetDefaultAddress(result);
-        } else {
-            return result.equals(defaultAddress.getString()) ? defaultAddress : new Address(result);
         }
+        return result.equals(defaultAddress.getString()) ? defaultAddress : new Address(result);
     }
 
     /**
@@ -1006,9 +1005,8 @@ public abstract class HTTPConduit
                     String location = locs.get(0);
                     if (location != null) {
                         return location;
-                    } else {
-                        return null;
                     }
+                    return null;
                 }
             }
         }
@@ -1298,9 +1296,8 @@ public abstract class HTTPConduit
                         + "Make sure server certificate is correct, or to disable this check
"
                         + "(NOT recommended for production) set the CXF client TLS "
                         + "configuration property \"disableCNCheck\" to true.");
-                } else {
-                    throw e;
                 }
+                throw e;
             }
         }
         protected String getMethod() {
@@ -1853,15 +1850,13 @@ public abstract class HTTPConduit
 
             if (MessageUtils.isTrue(message.getContextualProperty(AUTO_REDIRECT_ALLOW_REL_URI)))
{
                 return URI.create(lastURL).resolve(newURL).toString();
-            } else {
-                String msg = "Relative Redirect detected on Conduit '"
-                    + conduitName + "' on '" + newURL + "'";
-                LOG.log(Level.INFO, msg);
-                throw new IOException(msg);
             }
-        } else {
-            return newURL;
+            String msg = "Relative Redirect detected on Conduit '"
+                + conduitName + "' on '" + newURL + "'";
+            LOG.log(Level.INFO, msg);
+            throw new IOException(msg);
         }
+        return newURL;
 
     }
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/92514020/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Headers.java
----------------------------------------------------------------------
diff --git a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Headers.java b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Headers.java
index 1ec9b0c..d0f945f 100644
--- a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Headers.java
+++ b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/Headers.java
@@ -477,9 +477,8 @@ public class Headers {
             && ct.indexOf("charset=") == -1
             && !ct.toLowerCase().contains("multipart/related")) {
             return ct + "; charset=" + enc;
-        } else {
-            return ct;
         }
+        return ct;
     }
 
     // Assumes that response body is not available only
@@ -547,22 +546,16 @@ public class Headers {
         if (headerObject.getClass() == String.class) {
             // Most likely
             return headerObject.toString();
+        }
+        String headerString;
+        if (headerObject instanceof Date) {
+            headerString = toHttpDate((Date)headerObject);
+        } else if (headerObject instanceof Locale) {
+            headerString = toHttpLanguage((Locale)headerObject);
         } else {
-            // We may consider introducing CXF HeaderDelegate interface
-            // so that the below code may be pushed back to the JAX-RS
-            // front-end where non String header objects are more likely
-            // to be set. Though the below code may be generally useful
-
-            String headerString;
-            if (headerObject instanceof Date) {
-                headerString = toHttpDate((Date)headerObject);
-            } else if (headerObject instanceof Locale) {
-                headerString = toHttpLanguage((Locale)headerObject);
-            } else {
-                headerString = headerObject.toString();
-            }
-            return headerString;
+            headerString = headerObject.toString();
         }
+        return headerString;
     }
 
     void removeContentType() {

http://git-wip-us.apache.org/repos/asf/cxf/blob/92514020/rt/transports/http/src/main/java/org/apache/cxf/transport/http/ProxyFactory.java
----------------------------------------------------------------------
diff --git a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/ProxyFactory.java
b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/ProxyFactory.java
index c54575d..058672b 100644
--- a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/ProxyFactory.java
+++ b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/ProxyFactory.java
@@ -102,15 +102,13 @@ public class ProxyFactory {
             if (policy.isSetProxyServer()
                 && !StringUtils.isEmpty(policy.getProxyServer())) {
                 return getProxy(policy, currentUrl.getHost());
-            } else {
-                // There is a policy but no Proxy configuration,
-                // fallback on the system proxy configuration
-                return getSystemProxy(currentUrl.getHost());
             }
-        } else {
-            // Use system proxy configuration
+            // There is a policy but no Proxy configuration,
+            // fallback on the system proxy configuration
             return getSystemProxy(currentUrl.getHost());
         }
+        // Use system proxy configuration
+        return getSystemProxy(currentUrl.getHost());
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/cxf/blob/92514020/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSDestinationTest.java
----------------------------------------------------------------------
diff --git a/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSDestinationTest.java
b/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSDestinationTest.java
index 088a13c..1f4a8cf 100644
--- a/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSDestinationTest.java
+++ b/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSDestinationTest.java
@@ -308,6 +308,7 @@ public class JMSDestinationTest extends AbstractJMSTester {
         destination.shutdown();
     }
 
+    @SuppressWarnings("cast")
     @Test
     public void testIsMultiplexCapable() throws Exception {
         EndpointInfo ei = setupServiceInfo("HelloWorldService", "HelloWorldPort");

http://git-wip-us.apache.org/repos/asf/cxf/blob/92514020/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
index 5272bd5..aa97873 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
@@ -157,7 +157,7 @@ public class WSS4JInInterceptor extends AbstractWSS4JInterceptor {
         return result;
     }
     public final boolean isGET(SoapMessage message) {
-        String method = (String)message.get(SoapMessage.HTTP_REQUEST_METHOD);
+        String method = (String)message.get(org.apache.cxf.message.Message.HTTP_REQUEST_METHOD);
         return "GET".equals(method) && message.getContent(XMLStreamReader.class)
== null;
     }
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/92514020/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxInInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxInInterceptor.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxInInterceptor.java
index b2e3614..73879fe 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxInInterceptor.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxInInterceptor.java
@@ -89,7 +89,7 @@ public class WSS4JStaxInInterceptor extends AbstractWSS4JStaxInterceptor
{
     }
 
     public final boolean isGET(SoapMessage message) {
-        String method = (String)message.get(SoapMessage.HTTP_REQUEST_METHOD);
+        String method = (String)message.get(org.apache.cxf.message.Message.HTTP_REQUEST_METHOD);
         return "GET".equals(method) && message.getContent(XMLStreamReader.class)
== null;
     }
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/92514020/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JPrincipalInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JPrincipalInterceptor.java
b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JPrincipalInterceptor.java
index 7d06938..d6982da 100644
--- a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JPrincipalInterceptor.java
+++ b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JPrincipalInterceptor.java
@@ -43,16 +43,16 @@ public class WSS4JPrincipalInterceptor extends AbstractPhaseInterceptor<SoapMess
     public void handleMessage(SoapMessage message) throws Fault {
         SecurityContext context = message.get(SecurityContext.class);
         if (context == null) {
-            throw new SoapFault("No Security Context", SoapFault.FAULT_CODE_SERVER);
+            throw new SoapFault("No Security Context", Fault.FAULT_CODE_SERVER);
         }
 
         Principal principal = context.getUserPrincipal();
         if (principal == null) {
-            throw new SoapFault("No Security Principal", SoapFault.FAULT_CODE_SERVER);
+            throw new SoapFault("No Security Principal", Fault.FAULT_CODE_SERVER);
         }
 
         if (principalName != null && !principalName.equals(principal.getName()))
{
-            throw new SoapFault("Security Principal does not match", SoapFault.FAULT_CODE_SERVER);
+            throw new SoapFault("Security Principal does not match", Fault.FAULT_CODE_SERVER);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/92514020/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/jwt/JWTTokenValidator.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/jwt/JWTTokenValidator.java
b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/jwt/JWTTokenValidator.java
index 8590285..d699ebd 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/jwt/JWTTokenValidator.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/jwt/JWTTokenValidator.java
@@ -25,7 +25,6 @@ import java.util.Set;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
-import javax.xml.soap.Node;
 
 import org.w3c.dom.Element;
 
@@ -76,7 +75,7 @@ public class JWTTokenValidator implements TokenValidator {
         Object token = validateTarget.getToken();
         if (token instanceof Element) {
             Element tokenEl = (Element)token;
-            if (tokenEl.getFirstChild().getNodeType() == Node.TEXT_NODE) {
+            if (tokenEl.getFirstChild().getNodeType() == org.w3c.dom.Node.TEXT_NODE) {
                 try {
                     JwsJwtCompactConsumer jwtConsumer = new JwsJwtCompactConsumer(tokenEl.getTextContent());
                     if (jwtConsumer.getJwtToken() != null) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/92514020/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStore.java
----------------------------------------------------------------------
diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStore.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStore.java
index 4313179..d4e8d70 100644
--- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStore.java
+++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStore.java
@@ -1185,7 +1185,6 @@ public class BookStore {
     @POST
     @Path("/books/element/echo")
     public JAXBElement<Book> echoBookElement(JAXBElement<Book> element) throws
Exception {
-        Assert.assertTrue(element instanceof JAXBElement);
         return element;
     }
     @POST

http://git-wip-us.apache.org/repos/asf/cxf/blob/92514020/systests/uncategorized/src/test/java/org/apache/cxf/systest/outofband/header/OOBHeaderTest.java
----------------------------------------------------------------------
diff --git a/systests/uncategorized/src/test/java/org/apache/cxf/systest/outofband/header/OOBHeaderTest.java
b/systests/uncategorized/src/test/java/org/apache/cxf/systest/outofband/header/OOBHeaderTest.java
index f74f927..ae640aa 100644
--- a/systests/uncategorized/src/test/java/org/apache/cxf/systest/outofband/header/OOBHeaderTest.java
+++ b/systests/uncategorized/src/test/java/org/apache/cxf/systest/outofband/header/OOBHeaderTest.java
@@ -123,7 +123,7 @@ public class OOBHeaderTest extends AbstractBusClientServerTestBase {
             assertTrue("HeaderHolder list expected to conain 1 object received " + oobHdr.size(),
                     oobHdr.size() == 1);
 
-            if (oobHdr != null & oobHdr instanceof List) {
+            if (oobHdr != null) {
                 Iterator<?> iter = oobHdr.iterator();
                 while (iter.hasNext()) {
                     Object hdr = iter.next();


Mime
View raw message