Bunch more warning fixes

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

Branch: refs/heads/master
Commit: db11547c955d42be5dfa74463fa3d313123e6ffb
Parents: 344feb5
Author: Daniel Kulp <dk...@apache.org>
Authored: Tue Aug 8 15:38:38 2017 -0400
Committer: Daniel Kulp <dk...@apache.org>
Committed: Tue Aug 8 15:38:38 2017 -0400

----------------------------------------------------------------------
 .../apache/cxf/jaxrs/client/AbstractClient.java |   3 +-
 .../cxf/jaxrs/client/ClientConfiguration.java   |   3 +-
 .../cxf/jaxrs/client/ClientProxyImpl.java       |   3 +-
 .../client/CompletionStageRxInvokerImpl.java    |  12 +-
 .../jaxrs/client/JAXRSClientFactoryBean.java    |   9 +-
 .../jaxrs/client/UrlEncodingParamConverter.java |  19 +-
 .../org/apache/cxf/jaxrs/client/WebClient.java  |   6 +-
 .../JAXRSClientFactoryBeanDefinitionParser.java |  27 +-
 .../cxf/jaxrs/client/cache/ClientCacheTest.java |   3 +-
 .../jaxrs/swagger/DelegatingServletConfig.java  |   3 +-
 .../jaxrs/swagger/SyntheticServletConfig.java   |   3 +-
 .../jaxrs/swagger/parse/SwaggerParseUtils.java  |   3 +-
 .../cxf/jaxrs/model/wadl/WadlGenerator.java     |  21 +-
 .../cxf/jaxrs/json/basic/JsonMapObject.java     |  18 +-
 .../jaxrs/provider/atom/AtomPojoProvider.java   |  17 +-
 .../cxf/jaxrs/provider/json/JSONProvider.java   |   9 +-
 .../provider/json/SimpleTypeJsonProvider.java   |  17 +-
 .../jaxrs/provider/json/utils/JSONUtils.java    |   3 +-
 .../rx/client/ObservableRxInvokerImpl.java      |  12 +-
 .../search/AbstractSearchConditionParser.java   | 157 ++++----
 .../cxf/jaxrs/ext/search/InterfaceProxy.java    |   5 +-
 .../ext/search/PrimitiveSearchCondition.java    |  10 +-
 .../jaxrs/ext/search/QueryContextProvider.java  |   7 +-
 .../apache/cxf/jaxrs/ext/search/SearchBean.java |   3 +-
 .../cxf/jaxrs/ext/search/SearchContextImpl.java |   9 +-
 .../cxf/jaxrs/ext/search/SearchUtils.java       |   3 +-
 .../jaxrs/ext/search/SimpleSearchCondition.java |  71 ++--
 .../client/FiqlSearchConditionBuilder.java      |   9 +-
 .../cxf/jaxrs/ext/search/fiql/FiqlParser.java   |  33 +-
 .../jpa/AbstractJPATypedQueryVisitor.java       |   9 +-
 .../ext/search/lucene/LuceneQueryVisitor.java   |   5 +-
 .../jaxrs/ext/search/sql/SQLPrinterVisitor.java |   3 +-
 .../sci/JaxrsServletContainerInitializer.java   |   5 +-
 .../cors/CrossOriginResourceSharingFilter.java  |  33 +-
 .../jaxrs/AbstractJweJsonWriterProvider.java    |   3 +-
 .../jaxrs/AbstractJwsJsonWriterProvider.java    |   3 +-
 .../jose/common/KeyManagementUtils.java         |   6 +-
 .../jwe/AbstractWrapKeyEncryptionAlgorithm.java |   9 +-
 .../jose/jwe/EcdhDirectKeyJweEncryption.java    |   3 +-
 .../rs/security/jose/jwe/JweOutputStream.java   |   5 +-
 .../cxf/rs/security/jose/jwe/JweUtils.java      |  59 ++-
 .../PbesHmacAesWrapKeyEncryptionAlgorithm.java  |   3 +-
 .../jose/jwe/WrappedKeyDecryptionAlgorithm.java |   9 +-
 .../cxf/rs/security/jose/jwk/JsonWebKeys.java   |  18 +-
 .../cxf/rs/security/jose/jwk/JwkUtils.java      |  38 +-
 .../rs/security/jose/jws/JwsJsonConsumer.java   |   6 +-
 .../jose/jws/JwsJsonSignatureEntry.java         |   6 +-
 .../cxf/rs/security/jose/jws/JwsUtils.java      |  25 +-
 .../cxf/rs/security/jose/jwt/JwtClaims.java     |   3 +-
 .../oauth/filters/AbstractAuthFilter.java       |   5 +-
 .../oauth/provider/DefaultOAuthValidator.java   |  15 +-
 .../services/AuthorizationRequestHandler.java   |   5 +-
 .../grants/saml/Saml2BearerGrantHandler.java    |   3 +-
 .../oauth2/saml/SamlOAuthValidator.java         |   3 +-
 .../oauth2/client/BearerAuthSupplier.java       |   4 +-
 .../oauth2/client/ClientCodeRequestFilter.java  |  30 +-
 .../oauth2/client/OAuthClientUtils.java         |   3 +-
 .../oauth2/common/ClientAccessToken.java        |   3 +-
 .../oauth2/filters/OAuthRequestFilter.java      |   6 +-
 .../oauth2/grants/AbstractGrantHandler.java     |   3 +-
 .../code/AuthorizationCodeGrantHandler.java     |   9 +-
 .../grants/code/JPACMTCodeDataProvider.java     |   3 +-
 .../grants/code/JwtRequestCodeFilter.java       |   3 +-
 .../oauth2/grants/jwt/JwtBearerAuthHandler.java |   3 +-
 .../provider/AbstractOAuthDataProvider.java     |  18 +-
 .../DefaultEHCacheOAuthDataProvider.java        |   3 +-
 .../provider/JCacheOAuthDataProvider.java       |   6 +-
 .../oauth2/provider/JPAOAuthDataProvider.java   |   5 +-
 .../oauth2/provider/OAuthJSONProvider.java      |  12 +-
 .../oauth2/provider/OAuthJoseJwtConsumer.java   |   6 +-
 .../oauth2/provider/OAuthJoseJwtProducer.java   |   6 +-
 .../services/AbstractImplicitGrantService.java  |   7 +-
 .../oauth2/services/AbstractTokenService.java   |   8 +-
 .../services/AuthorizationCodeGrantService.java |  10 +-
 .../services/AuthorizationMetadataService.java  |   3 +-
 .../oauth2/services/AuthorizationService.java   |   9 +-
 .../services/DirectAuthorizationService.java    |   3 +-
 .../services/RedirectionBasedGrantService.java  |   9 +-
 .../hawk/HawkAccessTokenValidatorClient.java    |   3 +-
 .../oauth2/utils/AuthorizationUtils.java        |   3 +-
 .../rs/security/oauth2/utils/OAuthUtils.java    |  27 +-
 .../utils/crypto/ModelEncryptionSupport.java    |   3 +-
 .../security/oidc/common/ClaimRequirement.java  |   3 +-
 .../oidc/idp/IdTokenResponseFilter.java         |   3 +-
 .../security/oidc/rp/OidcIdTokenProvider.java   |   3 +-
 .../oidc/rp/OidcRpAuthenticationService.java    |   3 +-
 .../security/oidc/rp/OidcUserInfoProvider.java  |   3 +-
 .../cxf/rs/security/oidc/rp/UserInfoClient.java |  25 +-
 .../cxf/rs/security/oidc/utils/OidcUtils.java   |  41 +-
 .../security/saml/sso/AbstractSSOSpHandler.java |   3 +-
 .../saml/sso/AbstractServiceProviderFilter.java |  11 +-
 .../rs/security/saml/sso/MetadataService.java   |   9 +-
 .../saml/sso/SamlPostBindingFilter.java         |  51 ++-
 .../saml/sso/SamlRedirectBindingFilter.java     |  53 ++-
 .../cxf/rs/security/common/CryptoLoader.java    |   6 +-
 .../saml/SamlEnvelopedOutInterceptor.java       |   3 +-
 .../security/xml/AbstractXmlSecInHandler.java   |   9 +-
 .../xml/AbstractXmlSecOutInterceptor.java       |   3 +-
 .../security/xml/AbstractXmlSigInHandler.java   |   6 +-
 .../rs/security/xml/XmlSecInInterceptor.java    |  20 +-
 .../ClaimsAuthorizingInterceptor.java           |  22 +-
 .../interceptor/WSS4JBasicAuthValidator.java    |   3 +-
 .../http/Servlet3ContinuationProvider.java      |   3 +-
 .../http/URLConnectionHTTPConduit.java          |   3 +-
 .../http/auth/AbstractSpnegoAuthSupplier.java   |   3 +-
 .../http/auth/DefaultBasicAuthSupplier.java     |   3 +-
 .../transport/http/auth/DigestAuthSupplier.java |   3 +-
 .../auth/WSDLGetAuthenticatorInterceptor.java   |  11 +-
 .../https/CertConstraintsInterceptor.java       |  13 +-
 .../https/HttpsMessageTrustDecider.java         |  13 +-
 .../https/httpclient/PublicSuffixMatcher.java   |   3 +-
 .../transport/servlet/AbstractHTTPServlet.java  |  12 +-
 .../servicelist/FormattedServiceListWriter.java |  14 +-
 .../cxf/transport/jms/JMSDestination.java       |   3 +-
 .../apache/cxf/transport/jms/JMSFactory.java    |   3 +-
 .../cxf/transport/jms/uri/JMSURIParser.java     |   3 +-
 .../jms/util/JMSDestinationResolver.java        |   3 +-
 .../util/PollingMessageListenerContainer.java   |   3 +-
 .../cxf/transport/jms/JMSDestinationTest.java   |   3 +-
 .../cxf/transport/jms/uri/MyBeanLocator.java    |   3 +-
 .../websocket/WebSocketDestinationFactory.java  |  53 ++-
 .../websocket/ahc/AhcWebSocketConduit.java      |   3 +-
 .../AtmosphereWebSocketJettyDestination.java    |   3 +-
 .../atmosphere/DefaultProtocolInterceptor.java  |   3 +-
 .../WebSocketUndertowServletRequest.java        |   3 +-
 .../addressing/impl/InternalContextUtils.java   |   6 +-
 .../ws/policy/AssertionBuilderRegistryImpl.java |   5 +-
 .../cxf/ws/policy/EffectivePolicyImpl.java      |   3 +-
 .../cxf/ws/policy/EndpointPolicyImpl.java       |   3 +-
 .../cxf/ws/policy/PolicyAnnotationListener.java |   6 +-
 .../reference/RemoteReferenceResolver.java      |  17 +-
 .../selector/BaseAlternativeSelector.java       |  15 +-
 .../org/apache/cxf/ws/rm/AbstractSequence.java  |   3 +-
 .../apache/cxf/ws/rm/EncoderDecoder10AImpl.java |   3 +-
 .../apache/cxf/ws/rm/EncoderDecoder10Impl.java  |   3 +-
 .../apache/cxf/ws/rm/InternalContextUtils.java  |   3 +-
 .../org/apache/cxf/ws/rm/ManagedRMEndpoint.java |  14 +-
 .../org/apache/cxf/ws/rm/RMContextUtils.java    |  25 +-
 .../org/apache/cxf/ws/rm/RMInInterceptor.java   |   3 +-
 .../main/java/org/apache/cxf/ws/rm/RMUtils.java |   6 +-
 .../cxf/ws/rm/persistence/jdbc/RMTxStore.java   |  22 +-
 .../cxf/ws/security/cache/EHCacheUtils.java     |   3 +-
 .../policy/interceptors/STSInvoker.java         |   3 +-
 .../SecureConversationOutInterceptor.java       |   6 +-
 .../ws/security/trust/AbstractSTSClient.java    | 115 +++---
 .../ws/security/trust/STSTokenRetriever.java    |   6 +-
 .../apache/cxf/ws/security/trust/STSUtils.java  |  12 +-
 .../wss4j/AbstractWSS4JStaxInterceptor.java     |  15 +-
 .../DefaultWSS4JSecurityContextCreator.java     |   6 +-
 .../wss4j/UsernameTokenInterceptor.java         |   3 +-
 .../ws/security/wss4j/WSS4JInInterceptor.java   |   3 +-
 .../policyhandlers/AbstractBindingBuilder.java  |  10 +-
 .../AbstractStaxBindingHandler.java             |  25 +-
 .../AsymmetricBindingHandler.java               | 181 +++++----
 .../policyhandlers/SymmetricBindingHandler.java | 379 +++++++++----------
 .../policyhandlers/TransportBindingHandler.java |  38 +-
 .../SecuredPartsPolicyValidator.java            |   7 +-
 .../dialect/fragment/FragmentDialect.java       |   9 +-
 .../language/FragmentDialectLanguageQName.java  |   7 +-
 .../FragmentDialectLanguageXPath10.java         |  12 +-
 .../transfer/manager/MemoryResourceManager.java |  21 +-
 .../resourcefactory/ResourceFactoryImpl.java    |   3 +-
 .../interceptors/DocLiteralInInterceptor.java   |   3 +-
 .../factory/DefaultServiceConfiguration.java    |   6 +-
 .../cxf/wsdl/service/factory/ParamReader.java   |   4 +-
 .../factory/ReflectionServiceFactoryBean.java   |  31 +-
 .../apache/cxf/wsdl11/WSDLServiceFactory.java   |  17 +-
 .../cxf/wsdl11/WSDLServiceBuilderTest.java      |   3 +-
 .../apache/cxf/sts/claims/ClaimsManager.java    |  72 ++--
 .../cxf/sts/claims/mapper/JexlClaimsMapper.java |   3 +-
 .../TokenRequestCollectionOperation.java        |   3 +-
 .../apache/cxf/sts/request/RequestParser.java   |  25 +-
 .../sts/rest/RESTSecurityTokenServiceImpl.java  |  19 +-
 .../provider/DefaultConditionsProvider.java     |   3 +-
 .../token/provider/DefaultSubjectProvider.java  |  15 +-
 .../provider/jwt/DefaultJWTClaimsProvider.java  |   3 +-
 .../token/provider/jwt/JWTTokenProvider.java    |   7 +-
 .../cxf/sts/token/renewer/SAMLTokenRenewer.java |  14 +-
 .../validator/DefaultSubjectRoleParser.java     |   3 +-
 .../token/provider/CustomSubjectProvider.java   |  19 +-
 .../systest/sts/batch/SimpleBatchSTSClient.java |  46 ++-
 .../sts_sender_vouches/SVSubjectProvider.java   |  19 +-
 .../internal/WSDiscoveryServiceImpl.java        |  16 +-
 .../org/apache/cxf/wsn/jms/JmsSubscription.java |  38 +-
 .../wsn/jms/JmsTopicExpressionConverter.java    |   3 +-
 .../java/org/apache/cxf/wsn/WsnBrokerTest.java  |   3 +-
 .../crypto/provider/XkmsCryptoProvider.java     |   8 +-
 .../org/apache/cxf/xkms/handlers/DnUtils.java   |   3 +-
 .../cxf/xkms/x509/handlers/X509Register.java    |   5 +-
 .../apache/cxf/xkms/x509/utils/X509Utils.java   |   7 +-
 .../cxf/xkms/x509/repo/ldap/LdapSearch.java     |   3 +-
 .../apache/cxf/systest/jaxrs/BookServer.java    |   6 +-
 .../org/apache/cxf/systest/jaxrs/BookStore.java |  47 +--
 .../cxf/systest/jaxrs/BookStorePerRequest.java  |   7 +-
 .../systest/jaxrs/BookStoreWithInterface.java   |  10 +-
 .../systest/jaxrs/BookStoreWithInterface2.java  |   7 +-
 .../cxf/systest/jaxrs/BookSubresourceImpl.java  |   3 +-
 .../jaxrs/CustomJaxbElementProvider.java        |   3 +-
 .../CustomWebApplicationExceptionMapper.java    |   3 +-
 .../jaxrs/JAXRSClientServerStreamingTest.java   |   6 +-
 ...AXRSClientServerUserResourceDefaultTest.java |   3 +-
 .../cxf/systest/jaxrs/JAXRSSoapBookTest.java    |   3 +-
 .../apache/cxf/systest/jaxrs/JMSBookStore.java  |   7 +-
 .../cxf/systest/jaxrs/MultipartStore.java       |   6 +-
 .../cxf/systest/jaxrs/StringTextWriter.java     |   3 +-
 .../systest/jaxrs/cors/AnnotatedCorsServer.java |   3 +-
 .../jaxrs/jaxws/BookStoreSoapRestImpl.java      |   3 +-
 .../reactive/CompletableFutureService.java      |   3 +-
 .../systest/jaxrs/security/JettyJAASFilter.java |   3 +-
 .../jaxrs/websocket/WebSocketTestClient.java    |   3 +-
 .../cxf/systest/handlers/TestHandler.java       |   3 +-
 .../provider/AbstractSourcePayloadProvider.java |   5 +-
 .../common/KeystorePasswordCallback.java        |   3 +-
 .../kerberos/jaxrs/kerberos/BookStoreImpl.java  |   7 +-
 .../jaxrs/security/xml/JAXRSXmlSecTest.java     |   3 +-
 .../cxf/systest/jms/JMSClientServerTest.java    |   3 +-
 .../jms/security/KeystorePasswordCallback.java  |   3 +-
 .../cxf/systest/jms/tx/MyBeanLocator.java       |   3 +-
 .../websocket/BookStorePerRequest.java          |   7 +-
 .../websocket/WebSocketTestClient.java          |   3 +-
 .../cxf/systest/https/conduit/PushBack401.java  |  44 +--
 .../servlet/GetMethodQueryWebRequest.java       |   3 +-
 .../systest/bus/BusExtensionLoadingTest.java    |   3 +-
 .../cxf/systest/mtom_feature/ImageHelper.java   |  31 +-
 .../type_substitution/AppleFinderImpl.java      |   3 +-
 .../type_test/AbstractTypeTestClient2.java      |   9 +-
 .../type_test/AbstractTypeTestClient3.java      |  33 +-
 .../type_test/AbstractTypeTestClient4.java      |  13 +-
 .../apache/cxf/systest/ws/rm/ControlImpl.java   |  15 +-
 .../ws/rm/DeliveryAssuranceOnewayTest.java      |  19 +-
 .../ws/rm/MessageCallbackOnewayTest.java        |  19 +-
 .../ws/common/KeystorePasswordCallback.java     |   3 +-
 .../ws/policy/JavaFirstPolicyServiceTest.java   |   6 +-
 .../ws/policy/JavaFirstUriDomainExpression.java |   3 +-
 .../systest/ws/wssec10/WSSecurity10Test.java    |   3 +-
 .../systest/ws/wssec11/WSSecurity112Test.java   |  27 +-
 236 files changed, 1426 insertions(+), 1814 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/db11547c/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 bafc59c..c98a59f 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
@@ -608,9 +608,8 @@ public abstract class AbstractClient implements Client {
                 if (actualEx instanceof RuntimeException
                     && useProcExProp != null && 
PropertyUtils.isFalse(useProcExProp)) {
                     throw (Exception)actualEx;
-                } else {
-                    throw new ProcessingException(actualEx);
                 }
+                throw new ProcessingException(actualEx);
             } else if (!exchange.isOneWay() || 
cfg.isResponseExpectedForOneway()) {
                 waitForResponseCode(exchange);
             }

http://git-wip-us.apache.org/repos/asf/cxf/blob/db11547c/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientConfiguration.java
----------------------------------------------------------------------
diff --git 
a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientConfiguration.java
 
b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientConfiguration.java
index 805fb5d..14a2e21 100644
--- 
a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientConfiguration.java
+++ 
b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientConfiguration.java
@@ -68,9 +68,8 @@ public class ClientConfiguration implements 
InterceptorProvider, ConduitSelector
         Conduit conduit = getConduit();
         if (conduit instanceof HTTPConduit) {
             return ((HTTPConduit)conduit).getClient().getReceiveTimeout();
-        } else {
-            return synchronousTimeout;
         }
+        return synchronousTimeout;
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/cxf/blob/db11547c/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
----------------------------------------------------------------------
diff --git 
a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java 
b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
index 6bb11fa..508e430 100644
--- 
a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
+++ 
b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
@@ -833,9 +833,8 @@ public class ClientProxyImpl extends AbstractClient 
implements
             || callbackRespClass.isAssignableFrom(methodReturnType)
             || PrimitiveUtils.canPrimitiveTypeBeAutoboxed(methodReturnType, 
callbackRespClass)) {
             return callback;
-        } else {
-            return null;
         }
+        return null;
     }
 
     protected void doInvokeAsync(OperationResourceInfo ori, Message outMessage,

http://git-wip-us.apache.org/repos/asf/cxf/blob/db11547c/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/CompletionStageRxInvokerImpl.java
----------------------------------------------------------------------
diff --git 
a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/CompletionStageRxInvokerImpl.java
 
b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/CompletionStageRxInvokerImpl.java
index d9aaf6d..9bcb520 100644
--- 
a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/CompletionStageRxInvokerImpl.java
+++ 
b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/CompletionStageRxInvokerImpl.java
@@ -145,36 +145,32 @@ public class CompletionStageRxInvokerImpl implements 
CompletionStageRxInvoker {
     public <T> CompletionStage<T> method(String name, Entity<?> entity, 
Class<T> responseType) {
         if (ex == null) {
             return CompletableFuture.supplyAsync(() -> wc.sync().method(name, 
entity, responseType));
-        } else {
-            return CompletableFuture.supplyAsync(() -> wc.sync().method(name, 
entity, responseType), ex);
         }
+        return CompletableFuture.supplyAsync(() -> wc.sync().method(name, 
entity, responseType), ex);
     }
 
     @Override
     public <T> CompletionStage<T> method(String name, Entity<?> entity, 
GenericType<T> responseType) {
         if (ex == null) {
             return CompletableFuture.supplyAsync(() -> wc.sync().method(name, 
entity, responseType));
-        } else {
-            return CompletableFuture.supplyAsync(() -> wc.sync().method(name, 
entity, responseType), ex);
         }
+        return CompletableFuture.supplyAsync(() -> wc.sync().method(name, 
entity, responseType), ex);
     }
 
     @Override
     public <T> CompletionStage<T> method(String name, Class<T> responseType) {
         if (ex == null) {
             return CompletableFuture.supplyAsync(() -> wc.sync().method(name, 
responseType));
-        } else {
-            return CompletableFuture.supplyAsync(() -> wc.sync().method(name, 
responseType), ex);
         }
+        return CompletableFuture.supplyAsync(() -> wc.sync().method(name, 
responseType), ex);
     }
 
     @Override
     public <T> CompletionStage<T> method(String name, GenericType<T> 
responseType) {
         if (ex == null) {
             return CompletableFuture.supplyAsync(() -> wc.sync().method(name, 
responseType));
-        } else {
-            return CompletableFuture.supplyAsync(() -> wc.sync().method(name, 
responseType), ex);
         }
+        return CompletableFuture.supplyAsync(() -> wc.sync().method(name, 
responseType), ex);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/db11547c/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBean.java
----------------------------------------------------------------------
diff --git 
a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBean.java
 
b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBean.java
index 23d5f72..a783bf9 100644
--- 
a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBean.java
+++ 
b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBean.java
@@ -247,9 +247,8 @@ public class JAXRSClientFactoryBean extends 
AbstractJAXRSFactoryBean {
         if (initialState != null) {
             return headers != null
                 ? initialState.newState(URI.create(getAddress()), headers, 
null) : initialState;
-        } else {
-            return null;
         }
+        return null;
     }
 
     /**
@@ -270,9 +269,8 @@ public class JAXRSClientFactoryBean extends 
AbstractJAXRSFactoryBean {
     public Client create() {
         if (serviceClass == WebClient.class) {
             return createWebClient();
-        } else {
-            return createWithValues();
         }
+        return createWithValues();
     }
 
     /**
@@ -391,9 +389,8 @@ public class JAXRSClientFactoryBean extends 
AbstractJAXRSFactoryBean {
                         && AnnotationUtils.getAnnotation(anns, 
HeaderParam.class) == null
                         && AnnotationUtils.getAnnotation(anns, 
CookieParam.class) == null) {
                         return (ParamConverter<T>)new 
UrlEncodingParamConverter(encodeClientParametersList);
-                    } else {
-                        return null;
                     }
+                    return null;
                 }
 
             });

http://git-wip-us.apache.org/repos/asf/cxf/blob/db11547c/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/UrlEncodingParamConverter.java
----------------------------------------------------------------------
diff --git 
a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/UrlEncodingParamConverter.java
 
b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/UrlEncodingParamConverter.java
index e6e513a..7e41eb3 100644
--- 
a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/UrlEncodingParamConverter.java
+++ 
b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/UrlEncodingParamConverter.java
@@ -52,18 +52,17 @@ public class UrlEncodingParamConverter implements 
ParamConverter<String> {
     public String toString(String s) {
         if (encodeClientParametersList == null || 
encodeClientParametersList.isEmpty()) {
             return HttpUtils.urlEncode(s);
-        } else {
-            StringBuilder sb = new StringBuilder();
-            for (int i = 0; i < s.length(); i++) {
-                Character ch = s.charAt(i);
-                if (encodeClientParametersList.contains(ch)) {
-                    sb.append(HttpUtils.urlEncode(ch.toString()));
-                } else {
-                    sb.append(ch);
-                }
+        }
+        StringBuilder sb = new StringBuilder();
+        for (int i = 0; i < s.length(); i++) {
+            Character ch = s.charAt(i);
+            if (encodeClientParametersList.contains(ch)) {
+                sb.append(HttpUtils.urlEncode(ch.toString()));
+            } else {
+                sb.append(ch);
             }
-            return sb.toString();
         }
+        return sb.toString();
 
     }
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/db11547c/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/WebClient.java
----------------------------------------------------------------------
diff --git 
a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/WebClient.java 
b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/WebClient.java
index 69e691e..848b411 100644
--- a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/WebClient.java
+++ b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/WebClient.java
@@ -1231,9 +1231,8 @@ public class WebClient extends AbstractClient {
         AbstractClient newClient = toAbstractClient(client);
         if (newClient == null) {
             return null;
-        } else  {
-            return newClient.getState();
         }
+        return newClient.getState();
     }
 
     static URI convertStringToURI(String baseAddress) {
@@ -1244,9 +1243,8 @@ public class WebClient extends AbstractClient {
             // as the relative address will not work as the base address
             if (baseAddress.startsWith(HTTP_SCHEME)) {
                 return new UriBuilderImpl().uriAsTemplate(baseAddress).build();
-            } else {
-                throw ex;
             }
+            throw ex;
         }
     }
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/db11547c/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spring/JAXRSClientFactoryBeanDefinitionParser.java
----------------------------------------------------------------------
diff --git 
a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spring/JAXRSClientFactoryBeanDefinitionParser.java
 
b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spring/JAXRSClientFactoryBeanDefinitionParser.java
index 37ed586..211ae43 100644
--- 
a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spring/JAXRSClientFactoryBeanDefinitionParser.java
+++ 
b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spring/JAXRSClientFactoryBeanDefinitionParser.java
@@ -132,22 +132,21 @@ public class JAXRSClientFactoryBeanDefinitionParser 
extends AbstractFactoryBeanD
                     if (classes.get(Path.class).size() > 1) {
                         throw new NoUniqueBeanDefinitionException(Path.class, 
classes.get(Path.class).size(),
                             "More than one service class (@Path) has been 
discovered");
-                    } else {
-                        AutowireCapableBeanFactory beanFactory = 
ctx.getAutowireCapableBeanFactory();
-                        for (final Class< ? > providerClass: 
classes.get(Provider.class)) {
-                            Object bean = null;
-                            try {
-                                bean = beanFactory.createBean(providerClass,
-                                                       
AutowireCapableBeanFactory.AUTOWIRE_BY_TYPE, true);
-                            } catch (Exception ex) {
-                                bean = beanFactory.createBean(providerClass);
-                            }
-                            setProvider(bean);
+                    }
+                    AutowireCapableBeanFactory beanFactory = 
ctx.getAutowireCapableBeanFactory();
+                    for (final Class< ? > providerClass: 
classes.get(Provider.class)) {
+                        Object bean = null;
+                        try {
+                            bean = beanFactory.createBean(providerClass,
+                                                   
AutowireCapableBeanFactory.AUTOWIRE_BY_TYPE, true);
+                        } catch (Exception ex) {
+                            bean = beanFactory.createBean(providerClass);
                         }
+                        setProvider(bean);
+                    }
 
-                        for (final Class< ? > serviceClass: 
classes.get(Path.class)) {
-                            setServiceClass(serviceClass);
-                        }
+                    for (final Class< ? > serviceClass: 
classes.get(Path.class)) {
+                        setServiceClass(serviceClass);
                     }
                 }
             } catch (IOException ex) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/db11547c/rt/rs/client/src/test/java/org/apache/cxf/jaxrs/client/cache/ClientCacheTest.java
----------------------------------------------------------------------
diff --git 
a/rt/rs/client/src/test/java/org/apache/cxf/jaxrs/client/cache/ClientCacheTest.java
 
b/rt/rs/client/src/test/java/org/apache/cxf/jaxrs/client/cache/ClientCacheTest.java
index ac59490..7b39971 100644
--- 
a/rt/rs/client/src/test/java/org/apache/cxf/jaxrs/client/cache/ClientCacheTest.java
+++ 
b/rt/rs/client/src/test/java/org/apache/cxf/jaxrs/client/cache/ClientCacheTest.java
@@ -221,9 +221,8 @@ public class ClientCacheTest extends Assert {
             if (o instanceof Book) {
                 Book other = (Book)o;
                 return other.id.equals(id) && other.name.equals(name);
-            } else {
-                return false;
             }
+            return false;
         }
     }
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/db11547c/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/DelegatingServletConfig.java
----------------------------------------------------------------------
diff --git 
a/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/DelegatingServletConfig.java
 
b/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/DelegatingServletConfig.java
index 32166b7..51cfe3e 100644
--- 
a/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/DelegatingServletConfig.java
+++ 
b/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/DelegatingServletConfig.java
@@ -52,8 +52,7 @@ class DelegatingServletConfig implements ServletConfig {
     public String getInitParameter(String name) {
         if (Objects.equals(SwaggerContextService.USE_PATH_BASED_CONFIG, name)) 
{
             return "true";
-        } else {
-            return delegate.getInitParameter(name);
         }
+        return delegate.getInitParameter(name);
     }
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/db11547c/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/SyntheticServletConfig.java
----------------------------------------------------------------------
diff --git 
a/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/SyntheticServletConfig.java
 
b/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/SyntheticServletConfig.java
index 7fb486c..d508780 100644
--- 
a/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/SyntheticServletConfig.java
+++ 
b/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/SyntheticServletConfig.java
@@ -52,8 +52,7 @@ class SyntheticServletConfig implements ServletConfig {
     public String getInitParameter(String name) {
         if (Objects.equals(SwaggerContextService.USE_PATH_BASED_CONFIG, name)) 
{
             return "true";
-        } else {
-            return delegate.getInitParameter(name);
         }
+        return delegate.getInitParameter(name);
     }
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/db11547c/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/parse/SwaggerParseUtils.java
----------------------------------------------------------------------
diff --git 
a/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/parse/SwaggerParseUtils.java
 
b/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/parse/SwaggerParseUtils.java
index ffd0743..fbf86b3 100644
--- 
a/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/parse/SwaggerParseUtils.java
+++ 
b/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/parse/SwaggerParseUtils.java
@@ -208,8 +208,7 @@ public final class SwaggerParseUtils {
                 sb.append(s);
             }
             return sb.toString();
-        } else {
-            return null;
         }
+        return null;
     }
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/db11547c/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
----------------------------------------------------------------------
diff --git 
a/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
 
b/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
index 821f32e..9e1317f 100644
--- 
a/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
+++ 
b/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
@@ -347,9 +347,8 @@ public class WadlGenerator implements 
ContainerRequestFilter {
             if (!isJson) {
                 if (stylesheetReference != null && applyStylesheetLocally) {
                     return transformLocally(m, ui, new StreamSource(new 
StringReader(entity)));
-                } else {
-                    return entity;
                 }
+                return entity;
             }
             return StaxUtils.read(new StringReader(entity));
         } catch (Exception ex) {
@@ -362,9 +361,8 @@ public class WadlGenerator implements 
ContainerRequestFilter {
         String publishedEndpointUrl = 
(String)ei.getProperty("publishedEndpointUrl");
         if (publishedEndpointUrl == null) {
             return ui.getBaseUri().toString();
-        } else {
-            return publishedEndpointUrl;
         }
+        return publishedEndpointUrl;
     }
 
     protected void handleGrammars(StringBuilder sbApp, StringBuilder 
sbGrammars, SchemaWriter writer,
@@ -675,9 +673,8 @@ public class WadlGenerator implements 
ContainerRequestFilter {
             }
 
             return ori1PathParams == ori2PathParams && ori1MatrixParams == 
ori2MatrixParams;
-        } else {
-            return true;
         }
+        return true;
     }
 
     private boolean openResource(String path) {
@@ -794,9 +791,8 @@ public class WadlGenerator implements 
ContainerRequestFilter {
                 }
             }
             return new Annotation[] {};
-        } else {
-            return opMethod.getDeclaredAnnotations();
         }
+        return opMethod.getDeclaredAnnotations();
     }
 
     private void writeParam(StringBuilder sb, Parameter pm, 
OperationResourceInfo ori, boolean isJson) {
@@ -1540,9 +1536,8 @@ public class WadlGenerator implements 
ContainerRequestFilter {
         String ns = JAXBUtils.getPackageNamespace(type);
         if (ns != null) {
             return getQNameFromParts(name, ns, type, clsMap);
-        } else {
-            return null;
         }
+        return null;
 
     }
 
@@ -1873,9 +1868,8 @@ public class WadlGenerator implements 
ContainerRequestFilter {
             if (context != null) {
                 JAXBContextProxy proxy = 
JAXBUtils.createJAXBContextProxy(context);
                 return new JaxbContextQNameResolver(proxy);
-            } else {
-                return null;
             }
+            return null;
         } else if (externalQnamesMap != null) {
             return new SchemaQNameResolver(externalQnamesMap);
         } else {
@@ -2086,9 +2080,8 @@ public class WadlGenerator implements 
ContainerRequestFilter {
                 QName qname = DOMUtils.convertStringToQName(name.value(), 
name.prefix());
                 if (qname.getPrefix().length() > 0) {
                     return qname;
-                } else {
-                    return getQNameFromParts(qname.getLocalPart(), 
qname.getNamespaceURI(), type, clsMap);
                 }
+                return getQNameFromParts(qname.getLocalPart(), 
qname.getNamespaceURI(), type, clsMap);
             }
             return null;
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/db11547c/rt/rs/extensions/json-basic/src/main/java/org/apache/cxf/jaxrs/json/basic/JsonMapObject.java
----------------------------------------------------------------------
diff --git 
a/rt/rs/extensions/json-basic/src/main/java/org/apache/cxf/jaxrs/json/basic/JsonMapObject.java
 
b/rt/rs/extensions/json-basic/src/main/java/org/apache/cxf/jaxrs/json/basic/JsonMapObject.java
index e1bf0bb..edf5f62 100644
--- 
a/rt/rs/extensions/json-basic/src/main/java/org/apache/cxf/jaxrs/json/basic/JsonMapObject.java
+++ 
b/rt/rs/extensions/json-basic/src/main/java/org/apache/cxf/jaxrs/json/basic/JsonMapObject.java
@@ -63,9 +63,8 @@ public class JsonMapObject implements Serializable {
         Object value = getProperty(name);
         if (value != null) {
             return CastUtils.cast((Map<?, ?>)value);
-        } else {
-            return null;
         }
+        return null;
     }
 
     public Map<String, Object> asMap() {
@@ -75,41 +74,36 @@ public class JsonMapObject implements Serializable {
         Object value = getProperty(name);
         if (value != null) {
             return value instanceof Integer ? (Integer)value : 
Integer.parseInt(value.toString());
-        } else {
-            return null;
         }
+        return null;
     }
     public Long getLongProperty(String name) {
         Object value = getProperty(name);
         if (value != null) {
             return value instanceof Long ? (Long)value : 
Long.parseLong(value.toString());
-        } else {
-            return null;
         }
+        return null;
     }
     public Boolean getBooleanProperty(String name) {
         Object value = getProperty(name);
         if (value != null) {
             return value instanceof Boolean ? (Boolean)value : 
Boolean.parseBoolean(value.toString());
-        } else {
-            return null;
         }
+        return null;
     }
     public String getStringProperty(String name) {
         Object value = getProperty(name);
         if (value != null) {
             return value.toString();
-        } else {
-            return null;
         }
+        return null;
     }
     public List<String> getListStringProperty(String name) {
         Object value = getProperty(name);
         if (value != null) {
             return CastUtils.cast((List<?>)value);
-        } else {
-            return null;
         }
+        return null;
     }
     public int hashCode() {
         return values.hashCode();

http://git-wip-us.apache.org/repos/asf/cxf/blob/db11547c/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/atom/AtomPojoProvider.java
----------------------------------------------------------------------
diff --git 
a/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/atom/AtomPojoProvider.java
 
b/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/atom/AtomPojoProvider.java
index f02ca21..951eed0 100644
--- 
a/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/atom/AtomPojoProvider.java
+++ 
b/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/atom/AtomPojoProvider.java
@@ -257,9 +257,8 @@ public class AtomPojoProvider extends 
AbstractConfigurableProvider
         String method = map.get(pojoClass.getName());
         if (method != null) {
             return method;
-        } else {
-            return getCollectionMethod(map, pojoClass.getSuperclass());
         }
+        return getCollectionMethod(map, pojoClass.getSuperclass());
     }
 
     @SuppressWarnings("unchecked")
@@ -314,9 +313,8 @@ public class AtomPojoProvider extends 
AbstractConfigurableProvider
         T handler = handlers.get(pojoClass.getName());
         if (handler != null) {
             return handler;
-        } else {
-            return getAtomElementHandlerSuperClass(handlers, 
pojoClass.getSuperclass());
         }
+        return getAtomElementHandlerSuperClass(handlers, 
pojoClass.getSuperclass());
     }
 
     //CHECKSTYLE:OFF
@@ -603,13 +601,12 @@ public class AtomPojoProvider extends 
AbstractConfigurableProvider
 
         if (isFeed) {
             return readFromFeedOrEntry(cls, mt, headers, is);
-        } else {
-            AtomEntryProvider p = new AtomEntryProvider();
-            p.setAutodetectCharset(autodetectCharset);
-            Entry entry = p.readFrom(Entry.class, Entry.class,
-                                     new Annotation[]{}, mt, headers, is);
-            return readFromEntry(entry, cls);
         }
+        AtomEntryProvider p = new AtomEntryProvider();
+        p.setAutodetectCharset(autodetectCharset);
+        Entry entry = p.readFrom(Entry.class, Entry.class,
+                                 new Annotation[]{}, mt, headers, is);
+        return readFromEntry(entry, cls);
     }
 
     @SuppressWarnings("unchecked")

http://git-wip-us.apache.org/repos/asf/cxf/blob/db11547c/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/JSONProvider.java
----------------------------------------------------------------------
diff --git 
a/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/JSONProvider.java
 
b/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/JSONProvider.java
index aeb94b4..e90f065 100644
--- 
a/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/JSONProvider.java
+++ 
b/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/JSONProvider.java
@@ -211,9 +211,8 @@ public class JSONProvider<T> extends 
AbstractJAXBProvider<T>  {
         if (isPayloadEmpty(headers)) {
             if (AnnotationUtils.getAnnotation(anns, Nullable.class) != null) {
                 return null;
-            } else {
-                reportEmptyContentLength();
             }
+            reportEmptyContentLength();
         }
 
         XMLStreamReader reader = null;
@@ -259,9 +258,8 @@ public class JSONProvider<T> extends 
AbstractJAXBProvider<T>  {
         } catch (XMLStreamException e) {
             if (e.getCause() instanceof JSONSequenceTooLargeException) {
                 throw new WebApplicationException(413);
-            } else {
-                handleXMLStreamException(e, true);
             }
+            handleXMLStreamException(e, true);
         } catch (WebApplicationException e) {
             throw e;
         } catch (Exception e) {
@@ -323,9 +321,8 @@ public class JSONProvider<T> extends 
AbstractJAXBProvider<T>  {
 
             };
             return new SequenceInputStream(list);
-        } else {
-            return is;
         }
+        return is;
 
     }
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/db11547c/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/SimpleTypeJsonProvider.java
----------------------------------------------------------------------
diff --git 
a/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/SimpleTypeJsonProvider.java
 
b/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/SimpleTypeJsonProvider.java
index 9abc650..1c9ac15 100644
--- 
a/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/SimpleTypeJsonProvider.java
+++ 
b/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/SimpleTypeJsonProvider.java
@@ -112,16 +112,15 @@ public class SimpleTypeJsonProvider<T> extends 
AbstractConfigurableProvider
             } finally {
                 
JAXRSUtils.getCurrentMessage().put(ProviderFactory.ACTIVE_JAXRS_PROVIDER_KEY, 
null);
             }
-        } else {
-            String data = IOUtils.toString(is).trim();
-            int index = data.indexOf(':');
-            data = data.substring(index + 1, data.length() - 1).trim();
-            if (data.startsWith("\"")) {
-                data = data.substring(1, data.length() - 1);
-            }
-            return primitiveHelper.readFrom(type, genericType, annotations, 
mediaType, headers,
-                                            new 
ByteArrayInputStream(StringUtils.toBytesUTF8(data)));
         }
+        String data = IOUtils.toString(is).trim();
+        int index = data.indexOf(':');
+        data = data.substring(index + 1, data.length() - 1).trim();
+        if (data.startsWith("\"")) {
+            data = data.substring(1, data.length() - 1);
+        }
+        return primitiveHelper.readFrom(type, genericType, annotations, 
mediaType, headers,
+                                        new 
ByteArrayInputStream(StringUtils.toBytesUTF8(data)));
     }
 
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/db11547c/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/utils/JSONUtils.java
----------------------------------------------------------------------
diff --git 
a/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/utils/JSONUtils.java
 
b/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/utils/JSONUtils.java
index 7f76d0b..d0c1f06 100644
--- 
a/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/utils/JSONUtils.java
+++ 
b/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/utils/JSONUtils.java
@@ -196,9 +196,8 @@ public final class JSONUtils {
             if (name != null
                 && XSI_URI.equals(name.getNamespaceURI())) {
                 return XSI_PREFIX;
-            } else {
-                return super.getAttributePrefix(n);
             }
+            return super.getAttributePrefix(n);
         }
 
         @Override

http://git-wip-us.apache.org/repos/asf/cxf/blob/db11547c/rt/rs/extensions/rx/src/main/java/org/apache/cxf/jaxrs/rx/client/ObservableRxInvokerImpl.java
----------------------------------------------------------------------
diff --git 
a/rt/rs/extensions/rx/src/main/java/org/apache/cxf/jaxrs/rx/client/ObservableRxInvokerImpl.java
 
b/rt/rs/extensions/rx/src/main/java/org/apache/cxf/jaxrs/rx/client/ObservableRxInvokerImpl.java
index 3a79226..83e02f4 100644
--- 
a/rt/rs/extensions/rx/src/main/java/org/apache/cxf/jaxrs/rx/client/ObservableRxInvokerImpl.java
+++ 
b/rt/rs/extensions/rx/src/main/java/org/apache/cxf/jaxrs/rx/client/ObservableRxInvokerImpl.java
@@ -148,36 +148,32 @@ public class ObservableRxInvokerImpl implements 
ObservableRxInvoker {
     public <T> Observable<T> method(String name, Entity<?> entity, Class<T> 
responseType) {
         if (sc == null) {
             return Observable.from(wc.async().method(name, entity, 
responseType));
-        } else {
-            return Observable.from(wc.async().method(name, entity, 
responseType), sc);
         }
+        return Observable.from(wc.async().method(name, entity, responseType), 
sc);
     }
 
     @Override
     public <T> Observable<T> method(String name, Entity<?> entity, 
GenericType<T> responseType) {
         if (sc == null) {
             return Observable.from(wc.async().method(name, entity, 
responseType));
-        } else {
-            return Observable.from(wc.async().method(name, entity, 
responseType), sc);
         }
+        return Observable.from(wc.async().method(name, entity, responseType), 
sc);
     }
 
     @Override
     public <T> Observable<T> method(String name, Class<T> responseType) {
         if (sc == null) {
             return Observable.from(wc.async().method(name, responseType));
-        } else {
-            return Observable.from(wc.async().method(name, responseType), sc);
         }
+        return Observable.from(wc.async().method(name, responseType), sc);
     }
 
     @Override
     public <T> Observable<T> method(String name, GenericType<T> responseType) {
         if (sc == null) {
             return Observable.from(wc.async().method(name, responseType));
-        } else {
-            return Observable.from(wc.async().method(name, responseType), sc);
         }
+        return Observable.from(wc.async().method(name, responseType), sc);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/db11547c/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/AbstractSearchConditionParser.java
----------------------------------------------------------------------
diff --git 
a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/AbstractSearchConditionParser.java
 
b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/AbstractSearchConditionParser.java
index c71e103..c0eb282 100644
--- 
a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/AbstractSearchConditionParser.java
+++ 
b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/AbstractSearchConditionParser.java
@@ -107,9 +107,8 @@ public abstract class AbstractSearchConditionParser<T> 
implements SearchConditio
         int index = getDotIndex(setter);
         if (index != -1) {
             return setter.substring(0, index).toLowerCase();
-        } else {
-            return setter;
         }
+        return setter;
     }
 
     protected Object parseType(String originalPropName,
@@ -165,88 +164,85 @@ public abstract class AbstractSearchConditionParser<T> 
implements SearchConditio
                 castedValue = lastCastedValue;
             }
             return castedValue;
-        } else {
-            String[] names = setter.split("\\.");
-            try {
-                String nextPart = getMethodNameSuffix(names[1]);
-                Method getterM = actualType.getMethod("get" + nextPart, new 
Class[]{});
-                Class<?> returnType = getterM.getReturnType();
-                boolean returnCollection = 
InjectionUtils.isSupportedCollectionOrArray(returnType);
-                Class<?> actualReturnType = !returnCollection ? returnType
-                    : 
InjectionUtils.getActualType(getterM.getGenericReturnType());
-
-                boolean isPrimitive = !returnCollection
-                    && InjectionUtils.isPrimitive(returnType) || 
returnType.isEnum();
-                boolean lastTry = names.length == 2
-                    && (isPrimitive
-                        ||
-                        Date.class.isAssignableFrom(returnType)
-                        || returnCollection
-                        || paramConverterAvailable(returnType));
-
-                Object valueObject = ownerBean != null ? ownerBean
-                    : actualType.isInterface()
-                    ? Proxy.newProxyInstance(this.getClass().getClassLoader(),
-                                             new Class[]{actualType},
-                                             new InterfaceProxy())
-                    : actualType.newInstance();
-                Object nextObject;
-
-                if (lastTry) {
-                    if (!returnCollection) {
-                        nextObject = isPrimitive ? 
InjectionUtils.convertStringToPrimitive(value, returnType)
-                            : convertToDate(returnType, value);
+        }
+        String[] names = setter.split("\\.");
+        try {
+            String nextPart = getMethodNameSuffix(names[1]);
+            Method getterM = actualType.getMethod("get" + nextPart, new 
Class[]{});
+            Class<?> returnType = getterM.getReturnType();
+            boolean returnCollection = 
InjectionUtils.isSupportedCollectionOrArray(returnType);
+            Class<?> actualReturnType = !returnCollection ? returnType
+                : InjectionUtils.getActualType(getterM.getGenericReturnType());
+
+            boolean isPrimitive = !returnCollection
+                && InjectionUtils.isPrimitive(returnType) || 
returnType.isEnum();
+            boolean lastTry = names.length == 2
+                && (isPrimitive
+                    ||
+                    Date.class.isAssignableFrom(returnType)
+                    || returnCollection
+                    || paramConverterAvailable(returnType));
+
+            Object valueObject = ownerBean != null ? ownerBean
+                : actualType.isInterface()
+                ? Proxy.newProxyInstance(this.getClass().getClassLoader(),
+                                         new Class[]{actualType},
+                                         new InterfaceProxy())
+                : actualType.newInstance();
+            Object nextObject;
+
+            if (lastTry) {
+                if (!returnCollection) {
+                    nextObject = isPrimitive ? 
InjectionUtils.convertStringToPrimitive(value, returnType)
+                        : convertToDate(returnType, value);
+                } else {
+                    CollectionCheck collCheck = 
getCollectionCheck(originalPropName, true, actualReturnType);
+                    if (collCheck == null) {
+                        nextObject = getCollectionSingleton(valueType, value);
                     } else {
-                        CollectionCheck collCheck = 
getCollectionCheck(originalPropName, true, actualReturnType);
-                        if (collCheck == null) {
-                            nextObject = getCollectionSingleton(valueType, 
value);
-                        } else {
-                            typeInfo.setCollectionCheckInfo(new 
CollectionCheckInfo(collCheck, value));
-                            nextObject = getEmptyCollection(valueType);
-                        }
+                        typeInfo.setCollectionCheckInfo(new 
CollectionCheckInfo(collCheck, value));
+                        nextObject = getEmptyCollection(valueType);
                     }
-                } else if (!returnCollection) {
-                    nextObject = returnType.newInstance();
-                } else {
-                    nextObject = actualReturnType.newInstance();
-                }
-                Method setterM = actualType.getMethod("set" + nextPart, new 
Class[]{returnType});
-                Object valueObjectValue = null;
-                if (lastTry || !returnCollection) {
-                    valueObjectValue = nextObject;
-                } else {
-                    Class<?> collCls = 
Collection.class.isAssignableFrom(valueType) ? valueType : returnType;
-                    valueObjectValue = getCollectionSingleton(collCls, 
nextObject);
-                }
-                setterM.invoke(valueObject, new Object[]{valueObjectValue});
-
-                if (lastTry) {
-                    lastCastedValue = lastCastedValue == null ? valueObject : 
lastCastedValue;
-                    return isCollection ? getCollectionSingleton(valueType, 
lastCastedValue) : lastCastedValue;
-                } else {
-                    lastCastedValue = valueObject;
                 }
+            } else if (!returnCollection) {
+                nextObject = returnType.newInstance();
+            } else {
+                nextObject = actualReturnType.newInstance();
+            }
+            Method setterM = actualType.getMethod("set" + nextPart, new 
Class[]{returnType});
+            Object valueObjectValue = null;
+            if (lastTry || !returnCollection) {
+                valueObjectValue = nextObject;
+            } else {
+                Class<?> collCls = 
Collection.class.isAssignableFrom(valueType) ? valueType : returnType;
+                valueObjectValue = getCollectionSingleton(collCls, nextObject);
+            }
+            setterM.invoke(valueObject, new Object[]{valueObjectValue});
 
-                TypeInfo nextTypeInfo = new 
TypeInfo(valueObjectValue.getClass(), getterM.getGenericReturnType());
-                Object response = parseType(originalPropName,
-                                 nextObject,
-                                 lastCastedValue,
-                                 setter.substring(index + 1),
-                                 nextTypeInfo,
-                                 value);
-                if (ownerBean == null) {
-                    return isCollection ? getCollectionSingleton(valueType, 
lastCastedValue) : lastCastedValue;
-                } else {
-                    return response;
-                }
-            } catch (Throwable e) {
-                throw new SearchParseException("Cannot convert String value 
\"" + value
-                                               + "\" to a value of class " + 
valueType.getName(), e);
+            if (lastTry) {
+                lastCastedValue = lastCastedValue == null ? valueObject : 
lastCastedValue;
+                return isCollection ? getCollectionSingleton(valueType, 
lastCastedValue) : lastCastedValue;
+            }
+            lastCastedValue = valueObject;
+
+            TypeInfo nextTypeInfo = new TypeInfo(valueObjectValue.getClass(), 
getterM.getGenericReturnType());
+            Object response = parseType(originalPropName,
+                             nextObject,
+                             lastCastedValue,
+                             setter.substring(index + 1),
+                             nextTypeInfo,
+                             value);
+            if (ownerBean == null) {
+                return isCollection ? getCollectionSingleton(valueType, 
lastCastedValue) : lastCastedValue;
             }
+            return response;
+        } catch (Throwable e) {
+            throw new SearchParseException("Cannot convert String value \"" + 
value
+                                           + "\" to a value of class " + 
valueType.getName(), e);
         }
     }
 
-    private boolean paramConverterAvailable(Class<?> pClass) {
+    private boolean paramConverterAvailable(final Class<?> pClass) {
         Message m = JAXRSUtils.getCurrentMessage();
         ServerProviderFactory pf = m == null ? null : 
ServerProviderFactory.getInstance(m);
         return pf != null && pf.createParameterHandler(pClass, pClass, 
EMPTY_ANNOTTAIONS, m) != null;
@@ -272,17 +268,15 @@ public abstract class AbstractSearchConditionParser<T> 
implements SearchConditio
     private Object getCollectionSingleton(Class<?> collectionCls, Object 
value) {
         if (Set.class.isAssignableFrom(collectionCls)) {
             return Collections.singleton(value);
-        } else {
-            return Collections.singletonList(value);
         }
+        return Collections.singletonList(value);
     }
 
     private Object getEmptyCollection(Class<?> collectionCls) {
         if (Set.class.isAssignableFrom(collectionCls)) {
             return Collections.emptySet();
-        } else {
-            return Collections.emptyList();
         }
+        return Collections.emptyList();
     }
 
     private Object convertToDate(Class<?> valueType, String value) throws 
SearchParseException {
@@ -342,9 +336,8 @@ public abstract class AbstractSearchConditionParser<T> 
implements SearchConditio
     private String getMethodNameSuffix(String name) {
         if (name.length() == 1) {
             return name.toUpperCase();
-        } else {
-            return Character.toUpperCase(name.charAt(0)) + name.substring(1);
         }
+        return Character.toUpperCase(name.charAt(0)) + name.substring(1);
     }
 
     private int getDotIndex(String setter) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/db11547c/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/InterfaceProxy.java
----------------------------------------------------------------------
diff --git 
a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/InterfaceProxy.java
 
b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/InterfaceProxy.java
index a194a1a..acfd2d8 100644
--- 
a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/InterfaceProxy.java
+++ 
b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/InterfaceProxy.java
@@ -36,10 +36,9 @@ public class InterfaceProxy implements InvocationHandler {
         boolean isGetter = "get".equals(methodName.substring(0,  3));
         if (isGetter) {
             return map.get(property);
-        } else {
-            map.put(property, args[0]);
-            return null;
         }
+        map.put(property, args[0]);
+        return null;
     }
 
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/db11547c/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/PrimitiveSearchCondition.java
----------------------------------------------------------------------
diff --git 
a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/PrimitiveSearchCondition.java
 
b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/PrimitiveSearchCondition.java
index a282626..fffb0f4 100644
--- 
a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/PrimitiveSearchCondition.java
+++ 
b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/PrimitiveSearchCondition.java
@@ -99,11 +99,10 @@ public class PrimitiveSearchCondition<T> implements 
SearchCondition<T> {
     public boolean isMet(T pojo) {
         if (isPrimitive(pojo)) {
             return compare(pojo, cType, propertyValue);
-        } else {
-            Object lValue = getValue(propertyName, pojo);
-            Object rValue = getPrimitiveValue(propertyName, propertyValue);
-            return lValue == null ? false : compare(lValue, cType, rValue);
         }
+        Object lValue = getValue(propertyName, pojo);
+        Object rValue = getPrimitiveValue(propertyName, propertyValue);
+        return lValue == null ? false : compare(lValue, cType, rValue);
     }
 
     private Object getValue(String getter, T pojo) {
@@ -206,9 +205,8 @@ public class PrimitiveSearchCondition<T> implements 
SearchCondition<T> {
             } else {
                 return lval.contains(rval);
             }
-        } else {
-            return lval.equals(rval);
         }
+        return lval.equals(rval);
     }
 
     protected static Object getPrimitiveValue(String name, Object value) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/db11547c/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/QueryContextProvider.java
----------------------------------------------------------------------
diff --git 
a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/QueryContextProvider.java
 
b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/QueryContextProvider.java
index 6f63b70..1ec0b50 100644
--- 
a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/QueryContextProvider.java
+++ 
b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/QueryContextProvider.java
@@ -85,11 +85,10 @@ public class QueryContextProvider implements 
ContextProvider<QueryContext> {
             Object visitor = 
message.getContextualProperty(SearchUtils.SEARCH_VISITOR_PROPERTY);
             if (visitor == null) {
                 return null;
-            } else {
-                //TODO: consider introducing 
SearchConditionVisitor.getBeanClass &&
-                //      SearchConditionVisitor.getQueryClass to avoid such 
casts
-                return (SearchConditionVisitor<T, Y>)visitor;
             }
+            //TODO: consider introducing SearchConditionVisitor.getBeanClass &&
+            //      SearchConditionVisitor.getQueryClass to avoid such casts
+            return (SearchConditionVisitor<T, Y>)visitor;
         }
 
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/db11547c/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchBean.java
----------------------------------------------------------------------
diff --git 
a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchBean.java
 
b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchBean.java
index 28f18c3..56b92c9 100644
--- 
a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchBean.java
+++ 
b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchBean.java
@@ -50,8 +50,7 @@ public class SearchBean {
     public boolean equals(Object o) {
         if (o instanceof SearchBean) {
             return values.equals(((SearchBean)o).values);
-        } else {
-            return false;
         }
+        return false;
     }
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/db11547c/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchContextImpl.java
----------------------------------------------------------------------
diff --git 
a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchContextImpl.java
 
b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchContextImpl.java
index 1be39f6..1bf0a27 100644
--- 
a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchContextImpl.java
+++ 
b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchContextImpl.java
@@ -102,13 +102,11 @@ public class SearchContextImpl implements SearchContext {
             } catch (SearchParseException ex) {
                 if 
(PropertyUtils.isTrue(message.getContextualProperty(BLOCK_SEARCH_EXCEPTION))) {
                     return null;
-                } else {
-                    throw ex;
                 }
+                throw ex;
             }
-        } else {
-            return null;
         }
+        return null;
 
     }
 
@@ -130,9 +128,8 @@ public class SearchContextImpl implements SearchContext {
             if (queryStr.contains(SHORT_SEARCH_QUERY) || 
queryStr.contains(SEARCH_QUERY)) {
                 if (params.containsKey(SHORT_SEARCH_QUERY)) {
                     return params.getFirst(SHORT_SEARCH_QUERY);
-                } else {
-                    return params.getFirst(SEARCH_QUERY);
                 }
+                return params.getFirst(SEARCH_QUERY);
             } else if 
(MessageUtils.isTrue(message.getContextualProperty(USE_PLAIN_QUERY_PARAMETERS)))
 {
                 return convertPlainQueriesToFiqlExp(params);
             }

http://git-wip-us.apache.org/repos/asf/cxf/blob/db11547c/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchUtils.java
----------------------------------------------------------------------
diff --git 
a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchUtils.java
 
b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchUtils.java
index 30c5570..d5f2f43 100644
--- 
a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchUtils.java
+++ 
b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchUtils.java
@@ -115,9 +115,8 @@ public final class SearchUtils {
         }
         if (!containsWildcard(value)) {
             return alwaysWildcard ? "%" + value + "%" : value;
-        } else {
-            value = value.replaceAll("\\*", "%");
         }
+        value = value.replaceAll("\\*", "%");
         return value;
     }
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/db11547c/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SimpleSearchCondition.java
----------------------------------------------------------------------
diff --git 
a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SimpleSearchCondition.java
 
b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SimpleSearchCondition.java
index 944ff8b..19b6ba0 100644
--- 
a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SimpleSearchCondition.java
+++ 
b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SimpleSearchCondition.java
@@ -130,18 +130,16 @@ public class SimpleSearchCondition<T> implements 
SearchCondition<T> {
     public ConditionType getConditionType() {
         if (scts.size() > 1) {
             return joiningType;
-        } else {
-            return scts.get(0).getStatement().getCondition();
         }
+        return scts.get(0).getStatement().getCondition();
     }
 
     @Override
     public List<SearchCondition<T>> getSearchConditions() {
         if (scts.size() > 1) {
             return Collections.unmodifiableList(scts);
-        } else {
-            return null;
         }
+        return null;
     }
 
     private List<SearchCondition<T>> createConditions(Map<String, 
ConditionType> getters2operators,
@@ -151,43 +149,42 @@ public class SimpleSearchCondition<T> implements 
SearchCondition<T> {
         if (isBuiltIn(condition)) {
             return Collections.singletonList(
                 (SearchCondition<T>)new PrimitiveSearchCondition<>(null, 
condition, null, sharedType, condition));
-        } else {
-            List<SearchCondition<T>> list = new ArrayList<>();
-            Map<String, Object> get2val = getGettersAndValues();
+        }
+        List<SearchCondition<T>> list = new ArrayList<>();
+        Map<String, Object> get2val = getGettersAndValues();
 
-            Set<String> keySet = get2val != null ? get2val.keySet()
-                : ((SearchBean)condition).getKeySet();
+        Set<String> keySet = get2val != null ? get2val.keySet()
+            : ((SearchBean)condition).getKeySet();
 
-            for (String getter : keySet) {
-                ConditionType ct = getters2operators == null ? sharedType
-                    : getters2operators.get(getter.toLowerCase());
-                if (ct == null) {
-                    continue;
-                }
-                Object rval = get2val != null
-                    ? get2val.get(getter) : 
((SearchBean)condition).get(getter);
-                if (rval == null) {
-                    continue;
-                }
-                String realGetter = realGetters != null && 
realGetters.containsKey(getter)
-                    ? realGetters.get(getter) : getter;
+        for (String getter : keySet) {
+            ConditionType ct = getters2operators == null ? sharedType
+                : getters2operators.get(getter.toLowerCase());
+            if (ct == null) {
+                continue;
+            }
+            Object rval = get2val != null
+                ? get2val.get(getter) : ((SearchBean)condition).get(getter);
+            if (rval == null) {
+                continue;
+            }
+            String realGetter = realGetters != null && 
realGetters.containsKey(getter)
+                ? realGetters.get(getter) : getter;
 
-                TypeInfo tInfo = propertyTypeInfo != null ? 
propertyTypeInfo.get(getter) : null;
-                Type genType = tInfo != null ? tInfo.getGenericType() : 
rval.getClass();
-                CollectionCheckInfo checkInfo = tInfo != null ? 
tInfo.getCollectionCheckInfo() : null;
+            TypeInfo tInfo = propertyTypeInfo != null ? 
propertyTypeInfo.get(getter) : null;
+            Type genType = tInfo != null ? tInfo.getGenericType() : 
rval.getClass();
+            CollectionCheckInfo checkInfo = tInfo != null ? 
tInfo.getCollectionCheckInfo() : null;
 
-                PrimitiveSearchCondition<T> pc = checkInfo == null
-                    ? new PrimitiveSearchCondition<>(realGetter, rval, 
genType, ct, condition)
-                    : new CollectionCheckCondition<>(realGetter, rval, 
genType, ct, condition, checkInfo);
+            PrimitiveSearchCondition<T> pc = checkInfo == null
+                ? new PrimitiveSearchCondition<>(realGetter, rval, genType, 
ct, condition)
+                : new CollectionCheckCondition<>(realGetter, rval, genType, 
ct, condition, checkInfo);
 
-                list.add(pc);
+            list.add(pc);
 
-            }
-            if (list.isEmpty()) {
-                throw new IllegalStateException("This search condition is 
empty and can not be used");
-            }
-            return list;
         }
+        if (list.isEmpty()) {
+            throw new IllegalStateException("This search condition is empty 
and can not be used");
+        }
+        return list;
     }
 
     /**
@@ -283,9 +280,8 @@ public class SimpleSearchCondition<T> implements 
SearchCondition<T> {
             //we do not need compare class objects
             getters2values.keySet().remove("class");
             return getters2values;
-        } else {
-            return null;
         }
+        return null;
     }
 
     private Object getValue(Beanspector<T> beanspector, String getter, T pojo) 
{
@@ -320,9 +316,8 @@ public class SimpleSearchCondition<T> implements 
SearchCondition<T> {
     public PrimitiveStatement getStatement() {
         if (scts.size() == 1) {
             return scts.get(0).getStatement();
-        } else {
-            return null;
         }
+        return null;
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cxf/blob/db11547c/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/client/FiqlSearchConditionBuilder.java
----------------------------------------------------------------------
diff --git 
a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/client/FiqlSearchConditionBuilder.java
 
b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/client/FiqlSearchConditionBuilder.java
index 00c800e..45e56bf 100644
--- 
a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/client/FiqlSearchConditionBuilder.java
+++ 
b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/client/FiqlSearchConditionBuilder.java
@@ -131,9 +131,8 @@ public class FiqlSearchConditionBuilder extends 
SearchConditionBuilder {
         protected String buildPartial(Builder exclude) {
             if (parent != null && !parent.equals(exclude)) {
                 return parent.buildPartial(exclude) + result;
-            } else {
-                return result;
             }
+            return result;
         }
 
         public CompleteCondition after(Date date) {
@@ -430,12 +429,10 @@ public class FiqlSearchConditionBuilder extends 
SearchConditionBuilder {
                     // zone in XML is "+01:00" in Java is "+0100"; adding 
semicolon
                     int len = s.length();
                     return s.substring(0, len - 2) + ":" + s.substring(len - 
2, len);
-                } else {
-                    return s;
                 }
-            } else {
-                return value.toString();
+                return s;
             }
+            return value.toString();
         }
 
         protected String toFiqlPrimitiveCondition(ConditionType type) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/db11547c/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/fiql/FiqlParser.java
----------------------------------------------------------------------
diff --git 
a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/fiql/FiqlParser.java
 
b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/fiql/FiqlParser.java
index b2e1078..4fa7c38 100644
--- 
a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/fiql/FiqlParser.java
+++ 
b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/fiql/FiqlParser.java
@@ -242,9 +242,8 @@ public class FiqlParser<T> extends 
AbstractSearchConditionParser<T> {
         }
         if (ors.getSubnodes().size() == 1) {
             return ors.getSubnodes().get(0);
-        } else {
-            return ors;
         }
+        return ors;
     }
 
     protected ASTNode<T> parseComparison(String expr) throws 
SearchParseException {
@@ -263,12 +262,10 @@ public class FiqlParser<T> extends 
AbstractSearchConditionParser<T> {
             TypeInfoObject castedValue = parseType(propertyName, name, value);
             if (castedValue != null) {
                 return new Comparison(name, operator, castedValue);
-            } else {
-                return null;
             }
-        } else {
-            throw new SearchParseException("Not a comparison expression: " + 
expr);
+            return null;
         }
+        throw new SearchParseException("Not a comparison expression: " + expr);
     }
 
 
@@ -290,9 +287,8 @@ public class FiqlParser<T> extends 
AbstractSearchConditionParser<T> {
     protected String unwrapSetter(String setter) {
         if (setter.startsWith(EXTENSION_COUNT_OPEN) && setter.endsWith(")")) {
             return setter.substring(EXTENSION_COUNT_OPEN.length(), 
setter.length() - 1);
-        } else {
-            return setter;
         }
+        return setter;
     }
 
     // node of abstract syntax tree
@@ -339,9 +335,8 @@ public class FiqlParser<T> extends 
AbstractSearchConditionParser<T> {
             }
             if (OR.equals(operator)) {
                 return new OrSearchCondition<>(scNodes);
-            } else {
-                return new AndSearchCondition<>(scNodes);
             }
+            return new AndSearchCondition<>(scNodes);
 
         }
     }
@@ -371,13 +366,12 @@ public class FiqlParser<T> extends 
AbstractSearchConditionParser<T> {
 
             if (isPrimitive(cond)) {
                 return new SimpleSearchCondition<>(ct, cond);
-            } else {
-                String templateNameLCase = templateName.toLowerCase();
-                return new 
SimpleSearchCondition<>(Collections.singletonMap(templateNameLCase, ct),
-                                                    
Collections.singletonMap(templateNameLCase, name),
-                                                    
Collections.singletonMap(templateNameLCase, tvalue.getTypeInfo()),
-                                                    cond);
             }
+            String templateNameLCase = templateName.toLowerCase();
+            return new 
SimpleSearchCondition<>(Collections.singletonMap(templateNameLCase, ct),
+                                                
Collections.singletonMap(templateNameLCase, name),
+                                                
Collections.singletonMap(templateNameLCase, tvalue.getTypeInfo()),
+                                                cond);
         }
 
         private boolean isPrimitive(T pojo) {
@@ -390,11 +384,10 @@ public class FiqlParser<T> extends 
AbstractSearchConditionParser<T> {
                 if (beanspector != null) {
                     beanspector.instantiate().setValue(setter, 
tvalue.getObject());
                     return beanspector.getBean();
-                } else {
-                    SearchBean bean = (SearchBean)conditionClass.newInstance();
-                    bean.set(setter, tvalue.getObject().toString());
-                    return (T)bean;
                 }
+                SearchBean bean = (SearchBean)conditionClass.newInstance();
+                bean.set(setter, tvalue.getObject().toString());
+                return (T)bean;
             } catch (Throwable e) {
                 throw new SearchParseException(e);
             }

http://git-wip-us.apache.org/repos/asf/cxf/blob/db11547c/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/AbstractJPATypedQueryVisitor.java
----------------------------------------------------------------------
diff --git 
a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/AbstractJPATypedQueryVisitor.java
 
b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/AbstractJPATypedQueryVisitor.java
index 3ca8393..fe53e5a 100644
--- 
a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/AbstractJPATypedQueryVisitor.java
+++ 
b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/AbstractJPATypedQueryVisitor.java
@@ -283,9 +283,8 @@ public abstract class AbstractJPATypedQueryVisitor<T, T1, E>
             String post = name.substring(name.indexOf('.') + 1);
             final Path<?> nextPath = getNextPath(element, pre, post, cv, null);
             return getPath(nextPath, post, cv, collSize);
-        } else {
-            return getNextPath(element, name, null, cv, collSize);
         }
+        return getNextPath(element, name, null, cv, collSize);
     }
 
     private Path<?> getNextPath(Path<?> element, String name, String postName,
@@ -297,12 +296,10 @@ public abstract class AbstractJPATypedQueryVisitor<T, T1, 
E>
             final Path<?> path = getExistingJoinProperty((From<?, ?>)element, 
name);
             if (path != null) {
                 return path;
-            } else {
-                return element == root ? root.join(name) : ((Join<?, 
?>)element).join(name);
             }
-        } else {
-            return element.get(name);
+            return element == root ? root.join(name) : ((Join<?, 
?>)element).join(name);
         }
+        return element.get(name);
     }
 
     private boolean isJoinProperty(String prop) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/db11547c/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/lucene/LuceneQueryVisitor.java
----------------------------------------------------------------------
diff --git 
a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/lucene/LuceneQueryVisitor.java
 
b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/lucene/LuceneQueryVisitor.java
index 0310110..681c5cf 100644
--- 
a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/lucene/LuceneQueryVisitor.java
+++ 
b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/lucene/LuceneQueryVisitor.java
@@ -248,10 +248,9 @@ public class LuceneQueryVisitor<T> extends 
AbstractSearchConditionVisitor<T, Que
 
             if (type == ConditionType.LESS_THAN || type == 
ConditionType.LESS_OR_EQUALS) {
                 return TermRangeQuery.newStringRange(name, null, 
luceneDateValue, minInclusive, maxInclusive);
-            } else {
-                return TermRangeQuery.newStringRange(name, luceneDateValue,
-                    DateTools.dateToString(new Date(), 
Resolution.MILLISECOND), minInclusive, maxInclusive);
             }
+            return TermRangeQuery.newStringRange(name, luceneDateValue,
+                DateTools.dateToString(new Date(), Resolution.MILLISECOND), 
minInclusive, maxInclusive);
         } else {
             return null;
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/db11547c/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/sql/SQLPrinterVisitor.java
----------------------------------------------------------------------
diff --git 
a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/sql/SQLPrinterVisitor.java
 
b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/sql/SQLPrinterVisitor.java
index 7b8c4a5..d597c8c 100644
--- 
a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/sql/SQLPrinterVisitor.java
+++ 
b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/sql/SQLPrinterVisitor.java
@@ -78,9 +78,8 @@ public class SQLPrinterVisitor<T> extends 
AbstractUntypedSearchConditionVisitor<
                 } else if (properties.length == 2) {
                     if (joinDone) {
                         throw new SearchParseException("SQL Visitor has 
already created JOIN");
-                    } else {
-                        joinDone = true;
                     }
+                    joinDone = true;
                     String joinTable = getRealPropertyName(properties[0]);
                     // Joining key can be pre-configured
                     String joiningKey = primaryTable;

http://git-wip-us.apache.org/repos/asf/cxf/blob/db11547c/rt/rs/http-sci/src/main/java/org/apache/cxf/jaxrs/servlet/sci/JaxrsServletContainerInitializer.java
----------------------------------------------------------------------
diff --git 
a/rt/rs/http-sci/src/main/java/org/apache/cxf/jaxrs/servlet/sci/JaxrsServletContainerInitializer.java
 
b/rt/rs/http-sci/src/main/java/org/apache/cxf/jaxrs/servlet/sci/JaxrsServletContainerInitializer.java
index c1896e1..202f7fa 100644
--- 
a/rt/rs/http-sci/src/main/java/org/apache/cxf/jaxrs/servlet/sci/JaxrsServletContainerInitializer.java
+++ 
b/rt/rs/http-sci/src/main/java/org/apache/cxf/jaxrs/servlet/sci/JaxrsServletContainerInitializer.java
@@ -141,10 +141,9 @@ public class JaxrsServletContainerInitializer implements 
ServletContainerInitial
         ServletRegistration sr = ctx.getServletRegistration(name);
         if (sr != null) {
             return sr.getMappings().iterator().next();
-        } else {
-            final String error = "Servlet with a name " + name + " is not 
available";
-            throw new ServletException(error);
         }
+        final String error = "Servlet with a name " + name + " is not 
available";
+        throw new ServletException(error);
     }
 
     private boolean isApplicationServletAvailable(final ServletContext ctx, 
final Class<?> appClass) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/db11547c/rt/rs/security/cors/src/main/java/org/apache/cxf/rs/security/cors/CrossOriginResourceSharingFilter.java
----------------------------------------------------------------------
diff --git 
a/rt/rs/security/cors/src/main/java/org/apache/cxf/rs/security/cors/CrossOriginResourceSharingFilter.java
 
b/rt/rs/security/cors/src/main/java/org/apache/cxf/rs/security/cors/CrossOriginResourceSharingFilter.java
index 4bc5607..2c081b1 100644
--- 
a/rt/rs/security/cors/src/main/java/org/apache/cxf/rs/security/cors/CrossOriginResourceSharingFilter.java
+++ 
b/rt/rs/security/cors/src/main/java/org/apache/cxf/rs/security/cors/CrossOriginResourceSharingFilter.java
@@ -307,18 +307,16 @@ public class CrossOriginResourceSharingFilter implements 
ContainerRequestFilter,
             ClassResourceInfo subcri = 
ori.getClassResourceInfo().getSubResource(cls, cls);
             if (subcri == null) {
                 return null;
-            } else {
-                MultivaluedMap<String, String> newValues = new 
MetadataMap<String, String>();
-                newValues.putAll(values);
-                return findPreflightMethod(Collections.singletonMap(subcri, 
newValues),
-                                           
values.getFirst(URITemplate.FINAL_MATCH_GROUP),
-                                           httpMethod,
-                                           newValues,
-                                           m);
             }
-        } else {
-            return ori;
+            MultivaluedMap<String, String> newValues = new MetadataMap<String, 
String>();
+            newValues.putAll(values);
+            return findPreflightMethod(Collections.singletonMap(subcri, 
newValues),
+                                       
values.getFirst(URITemplate.FINAL_MATCH_GROUP),
+                                       httpMethod,
+                                       newValues,
+                                       m);
         }
+        return ori;
     }
 
     private void setAllowOriginAndCredentials(Message m,
@@ -392,17 +390,15 @@ public class CrossOriginResourceSharingFilter implements 
ContainerRequestFilter,
     private boolean effectiveAllowAllOrigins(CrossOriginResourceSharing ann) {
         if (ann != null) {
             return ann.allowAllOrigins();
-        } else {
-            return allowOrigins.isEmpty();
         }
+        return allowOrigins.isEmpty();
     }
 
     private boolean effectiveAllowCredentials(CrossOriginResourceSharing ann) {
         if (ann != null) {
             return ann.allowCredentials();
-        } else {
-            return allowCredentials;
         }
+        return allowCredentials;
     }
 
     private boolean effectiveAllowOrigins(CrossOriginResourceSharing ann, 
List<String> origins) {
@@ -424,9 +420,8 @@ public class CrossOriginResourceSharingFilter implements 
ContainerRequestFilter,
     private boolean effectiveAllowAnyHeaders(CrossOriginResourceSharing ann) {
         if (ann != null) {
             return ann.allowHeaders().length == 0;
-        } else {
-            return allowHeaders.isEmpty();
         }
+        return allowHeaders.isEmpty();
     }
 
     private boolean effectiveAllowHeaders(CrossOriginResourceSharing ann, 
List<String> aHeaders) {
@@ -460,12 +455,10 @@ public class CrossOriginResourceSharingFilter implements 
ContainerRequestFilter,
             int ma = ann.maxAge();
             if (ma < 0) {
                 return null;
-            } else {
-                return Integer.valueOf(ma);
             }
-        } else {
-            return maxAge;
+            return Integer.valueOf(ma);
         }
+        return maxAge;
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/cxf/blob/db11547c/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/AbstractJweJsonWriterProvider.java
----------------------------------------------------------------------
diff --git 
a/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/AbstractJweJsonWriterProvider.java
 
b/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/AbstractJweJsonWriterProvider.java
index 8e41ac4..f9d9f8a 100644
--- 
a/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/AbstractJweJsonWriterProvider.java
+++ 
b/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/AbstractJweJsonWriterProvider.java
@@ -74,9 +74,8 @@ public class AbstractJweJsonWriterProvider {
             if (encProviders == null) {
                 LOG.warning("JWE JSON init properties resource is not 
identified");
                 throw new JweException(JweException.Error.NO_INIT_PROPERTIES);
-            } else {
-                return Collections.emptyList();
             }
+            return Collections.emptyList();
         }
         List<String> propLocs = null;
         if (propLocsProp instanceof String) {

Reply via email to