cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [3/3] cxf git commit: The new PMD plugin is strict about simplifying boolean returns
Date Fri, 03 Apr 2015 16:02:58 GMT
The new PMD plugin is strict about simplifying boolean returns


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

Branch: refs/heads/master
Commit: 3309231e467225b18b24d90d77153a0c572a17e0
Parents: 4387055
Author: Daniel Kulp <dkulp@apache.org>
Authored: Fri Apr 3 12:00:25 2015 -0400
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Fri Apr 3 12:02:47 2015 -0400

----------------------------------------------------------------------
 .../apache/cxf/common/util/PropertyUtils.java   | 12 +---
 .../org/apache/cxf/common/util/StringUtils.java |  5 +-
 .../cxf/interceptor/FIStaxInInterceptor.java    |  7 +--
 .../org/apache/cxf/staxutils/StaxUtils.java     |  7 +--
 .../staxutils/transform/OutTransformWriter.java |  7 +--
 .../cxf/jca/cxf/ManagedConnectionImpl.java      |  5 +-
 .../cxf/jca/outbound/CXFConnectionSpec.java     |  6 +-
 .../outbound/ManagedConnectionFactoryImpl.java  |  6 +-
 .../org/apache/cxf/jca/servant/EJBEndpoint.java | 10 +---
 parent/pom.xml                                  |  4 +-
 .../cxf/binding/corba/utils/CorbaUtils.java     |  5 +-
 .../cxf/aegis/type/basic/BeanTypeInfo.java      |  6 +-
 .../apache/cxf/aegis/inheritance/ws1/BeanA.java |  6 +-
 .../apache/cxf/aegis/inheritance/ws1/BeanB.java |  6 +-
 .../apache/cxf/aegis/inheritance/ws1/BeanC.java |  6 +-
 .../cxf/aegis/inheritance/ws1/ResultBean.java   |  6 +-
 .../cxf/aegis/inheritance/ws1/RootBean.java     |  6 +-
 .../cxf/aegis/inheritance/ws1/WS1Exception.java |  6 +-
 .../inheritance/ws1/WS1ExtendedException.java   |  6 +-
 .../inheritance/ws2/common/ParentBean.java      |  6 +-
 .../exception/AlreadyExistsException.java       |  6 +-
 .../ws2/common/exception/NotFoundException.java |  6 +-
 .../ws2/common/pack1/ContentBean1.java          |  6 +-
 .../ws2/common/pack2/ContentBean2.java          |  6 +-
 .../org/apache/cxf/jaxb/JAXBEncoderDecoder.java |  5 +-
 .../cxf/jaxrs/provider/MultipartProvider.java   |  7 +--
 .../provider/RequestDispatcherProvider.java     |  5 +-
 .../apache/cxf/jaxrs/utils/ExceptionUtils.java  |  6 +-
 .../org/apache/cxf/jaxrs/utils/JAXRSUtils.java  | 14 ++---
 .../jaxrs/utils/multipart/AttachmentUtils.java  |  5 +-
 .../apache/cxf/frontend/WSDLGetInterceptor.java |  6 +-
 .../javascript/JavascriptGetInterceptor.java    |  5 +-
 .../client/service/settings/Subscription.java   |  6 +-
 .../web/logging/atom/AtomPushEngine.java        |  6 +-
 .../AbstractMessageResponseTimeInterceptor.java |  5 +-
 .../cxf/jaxrs/client/ClientProxyImpl.java       |  7 +--
 .../jaxrs/provider/atom/AtomPojoProvider.java   |  5 +-
 .../search/AbstractSearchConditionParser.java   |  5 +-
 .../cxf/rs/security/oauth/data/Client.java      |  6 +-
 .../security/saml/sso/AbstractSSOSpHandler.java |  6 +-
 .../apache/cxf/transport/http/HTTPConduit.java  |  5 +-
 .../https/AllowAllHostnameVerifier.java         |  7 +--
 .../ws/addressing/impl/MAPAggregatorImpl.java   | 12 +---
 .../addressing/soap/DecoupledFaultHandler.java  |  5 +-
 .../external/URIDomainExpression.java           | 45 ++++-----------
 .../apache/cxf/ws/rm/AbstractRMInterceptor.java |  5 +-
 .../cxf/ws/security/policy/PolicyUtils.java     |  6 +-
 .../apache/cxf/ws/security/trust/STSUtils.java  |  6 +-
 .../wss4j/AbstractTokenInterceptor.java         |  5 +-
 .../wss4j/PolicyBasedWSS4JInInterceptor.java    |  6 +-
 .../wss4j/StaxCryptoCoverageChecker.java        | 60 ++++++--------------
 .../wss4j/StaxSecurityContextInInterceptor.java | 16 ++----
 .../wss4j/UsernameTokenInterceptor.java         |  7 +--
 .../ws/security/wss4j/WSS4JInInterceptor.java   | 15 +----
 .../policyhandlers/SymmetricBindingHandler.java |  8 +--
 .../AbstractBindingPolicyValidator.java         | 15 +----
 .../AbstractSupportingTokenPolicyValidator.java | 60 +++++---------------
 .../AlgorithmSuitePolicyValidator.java          | 20 ++-----
 .../AsymmetricBindingPolicyValidator.java       |  8 +--
 .../ConcreteSupportingTokenPolicyValidator.java |  8 +--
 .../EncryptedTokenPolicyValidator.java          |  8 +--
 .../EndorsingEncryptedTokenPolicyValidator.java |  8 +--
 .../EndorsingTokenPolicyValidator.java          |  8 +--
 .../IssuedTokenPolicyValidator.java             |  8 +--
 .../KerberosTokenPolicyValidator.java           |  8 +--
 .../policyvalidators/LayoutPolicyValidator.java |  8 +--
 .../SamlTokenPolicyValidator.java               |  8 +--
 .../SecurityContextTokenPolicyValidator.java    |  8 +--
 .../SignedEncryptedTokenPolicyValidator.java    |  8 +--
 ...dEndorsingEncryptedTokenPolicyValidator.java |  8 +--
 .../SignedEndorsingTokenPolicyValidator.java    |  8 +--
 .../SignedTokenPolicyValidator.java             |  8 +--
 .../SymmetricBindingPolicyValidator.java        |  8 +--
 .../TransportBindingPolicyValidator.java        |  8 +--
 .../UsernameTokenPolicyValidator.java           |  8 +--
 .../policyvalidators/WSS11PolicyValidator.java  |  8 +--
 .../X509TokenPolicyValidator.java               |  8 +--
 .../apache/cxf/wsdl11/PartialWSDLProcessor.java | 21 ++-----
 .../apache/cxf/wsdl11/WSDLServiceBuilder.java   |  5 +-
 .../sts/token/provider/SAMLTokenProvider.java   |  7 +--
 .../cxf/sts/token/provider/SCTProvider.java     |  7 +--
 .../token/validator/UsernameTokenValidator.java |  5 +-
 .../cxf/sts/operation/DummyTokenProvider.java   |  5 +-
 .../cxf/sts/operation/DummyTokenValidator.java  |  7 +--
 .../sts/deployment/CustomBSTTokenProvider.java  |  5 +-
 .../sts/deployment/CustomBSTTokenValidator.java |  7 +--
 .../CustomUsernameTokenProvider.java            |  5 +-
 .../sts/secure_conv/SCTSAMLTokenProvider.java   |  7 +--
 .../UsernameTokenValidator.java                 |  5 +-
 .../internal/WSDiscoveryServiceImpl.java        |  5 +-
 .../security/AllowAllHostnameVerifier.java      |  5 +-
 .../type_test/AbstractTypeTestClient.java       |  9 +--
 .../type_test/AbstractTypeTestClient3.java      | 12 +---
 .../apache/cxf/systest/ws/util/MessageFlow.java |  5 +-
 .../systest/ws/wssec11/WSSecurity11Common.java  |  6 +-
 .../apache/cxf/systest/ws/util/MessageFlow.java |  5 +-
 .../common/AbstractBusClientServerTestBase.java |  5 +-
 .../tools/common/AbstractCXFToolContainer.java  |  5 +-
 .../apache/cxf/tools/common/ToolContext.java    | 10 +---
 .../corba/processors/idl/AttributeVisitor.java  |  7 +--
 .../corba/processors/idl/ConstVisitor.java      |  5 +-
 .../tools/corba/processors/idl/EnumVisitor.java |  5 +-
 .../corba/processors/idl/ExceptionVisitor.java  |  5 +-
 .../processors/idl/FixedPtConstVisitor.java     |  5 +-
 .../corba/processors/idl/FixedVisitor.java      |  5 +-
 .../corba/processors/idl/PortTypeVisitor.java   |  5 +-
 .../corba/processors/idl/ScopedNameVisitor.java |  7 +--
 .../corba/processors/idl/SequenceVisitor.java   |  5 +-
 .../corba/processors/idl/StringVisitor.java     | 12 +---
 .../corba/processors/idl/StructVisitor.java     |  5 +-
 .../corba/processors/idl/TypedefVisitor.java    |  5 +-
 .../corba/processors/idl/UnionVisitor.java      |  5 +-
 .../corba/processors/wsdl/WSDLParameter.java    |  5 +-
 .../processors/wsdl/WSDLToCorbaHelper.java      |  6 +-
 .../java2wsdl/processor/FrontendFactory.java    | 10 +---
 .../processor/internal/AntGenerator.java        |  5 +-
 .../internal/jaxws/JAXWSFrontEndProcessor.java  |  5 +-
 .../jaxws/generator/JaxwsClientGenerator.java   |  7 +--
 .../jaxws/generator/JaxwsImplGenerator.java     |  7 +--
 .../jaxws/generator/JaxwsSEIGenerator.java      |  7 +--
 .../jaxws/generator/JaxwsServerGenerator.java   |  5 +-
 .../simple/generator/SimpleClientGenerator.java |  5 +-
 .../simple/generator/SimpleImplGenerator.java   |  9 +--
 .../simple/generator/SimpleSEIGenerator.java    |  8 +--
 .../simple/generator/SimpleServerGenerator.java |  5 +-
 .../tools/wadlto/jaxb/CustomizationParser.java  |  6 +-
 .../cxf/tools/wsdlto/WSDLToJavaContainer.java   |  5 +-
 .../customization/CustomizationParser.java      | 20 +------
 .../jaxws/customization/JAXWSBindingParser.java |  8 +--
 .../frontend/jaxws/generators/AntGenerator.java |  7 +--
 .../jaxws/generators/ClientGenerator.java       | 15 +----
 .../jaxws/generators/FaultGenerator.java        |  8 +--
 .../jaxws/generators/ImplGenerator.java         | 19 +------
 .../frontend/jaxws/generators/SEIGenerator.java |  9 +--
 .../jaxws/generators/ServerGenerator.java       | 13 +----
 .../jaxws/generators/ServiceGenerator.java      |  7 +--
 .../processor/internal/ParameterProcessor.java  |  5 +-
 .../processor/internal/ServiceProcessor.java    |  7 +--
 .../internal/annotator/BindingAnnotator.java    |  7 +--
 .../WrapperStyleNameCollisionValidator.java     |  5 +-
 .../misc/processor/WSDLToSoapProcessor.java     |  7 +--
 141 files changed, 259 insertions(+), 908 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/core/src/main/java/org/apache/cxf/common/util/PropertyUtils.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/common/util/PropertyUtils.java b/core/src/main/java/org/apache/cxf/common/util/PropertyUtils.java
index ec09abb..ded47cd 100644
--- a/core/src/main/java/org/apache/cxf/common/util/PropertyUtils.java
+++ b/core/src/main/java/org/apache/cxf/common/util/PropertyUtils.java
@@ -65,11 +65,7 @@ public final class PropertyUtils {
             return false;
         }
 
-        if (Boolean.TRUE.equals(property) || "true".equalsIgnoreCase(property.toString())) {
-            return true;
-        }
-        
-        return false;
+        return Boolean.TRUE.equals(property) || "true".equalsIgnoreCase(property.toString());
     }
     
     /**
@@ -85,11 +81,7 @@ public final class PropertyUtils {
             return false;
         }
 
-        if (Boolean.FALSE.equals(property) || "false".equalsIgnoreCase(property.toString())) {
-            return true;
-        }
-        
-        return false;
+        return Boolean.FALSE.equals(property) || "false".equalsIgnoreCase(property.toString());
     }
     
     public static Long getLong(Message message, String key) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/core/src/main/java/org/apache/cxf/common/util/StringUtils.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/common/util/StringUtils.java b/core/src/main/java/org/apache/cxf/common/util/StringUtils.java
index aa34a6c..8eb14f5 100644
--- a/core/src/main/java/org/apache/cxf/common/util/StringUtils.java
+++ b/core/src/main/java/org/apache/cxf/common/util/StringUtils.java
@@ -78,10 +78,7 @@ public final class StringUtils {
         if (list == null || list.size() == 0) {
             return true;
         }
-        if (list.size() == 1 && isEmpty(list.get(0))) {
-            return true;
-        }
-        return false;
+        return list.size() == 1 && isEmpty(list.get(0));
     }
    
     public static String diff(String str1, String str2) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/core/src/main/java/org/apache/cxf/interceptor/FIStaxInInterceptor.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/interceptor/FIStaxInInterceptor.java b/core/src/main/java/org/apache/cxf/interceptor/FIStaxInInterceptor.java
index 176792f..caa71d8 100644
--- a/core/src/main/java/org/apache/cxf/interceptor/FIStaxInInterceptor.java
+++ b/core/src/main/java/org/apache/cxf/interceptor/FIStaxInInterceptor.java
@@ -91,11 +91,8 @@ public class FIStaxInInterceptor extends AbstractPhaseInterceptor<Message> {
     
     protected boolean isHttpVerbSupported(Message message) {
         if (isGET(message)) {
-            if (isRequestor(message) 
-                && MessageUtils.isTrue(message.getContextualProperty(FI_GET_SUPPORTED))) {
-                return true;
-            }
-            return false;
+            return isRequestor(message) 
+                && MessageUtils.isTrue(message.getContextualProperty(FI_GET_SUPPORTED));
         } else {
             return true;
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/core/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/staxutils/StaxUtils.java b/core/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
index 78b0e11..49a551f 100644
--- a/core/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
+++ b/core/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
@@ -345,16 +345,13 @@ public final class StaxUtils {
     private static boolean setRestrictionProperties(XMLInputFactory factory) {
         //For now, we can only support Woodstox 4.2.x and newer as none of the other
         //stax parsers support these settings
-        if (setProperty(factory, "com.ctc.wstx.maxAttributesPerElement", maxAttributeCount)
+        return setProperty(factory, "com.ctc.wstx.maxAttributesPerElement", maxAttributeCount)
             && setProperty(factory, "com.ctc.wstx.maxAttributeSize", maxAttributeSize)
             && setProperty(factory, "com.ctc.wstx.maxChildrenPerElement", innerElementCountThreshold)
             && setProperty(factory, "com.ctc.wstx.maxElementCount", maxElementCount)
             && setProperty(factory, "com.ctc.wstx.maxElementDepth", innerElementLevelThreshold)
             && setProperty(factory, "com.ctc.wstx.maxCharacters", maxXMLCharacters)
-            && setProperty(factory, "com.ctc.wstx.maxTextLength", maxTextLength)) {
-            return true;
-        }
-        return false;
+            && setProperty(factory, "com.ctc.wstx.maxTextLength", maxTextLength);
     }
 
     private static boolean setProperty(XMLInputFactory f, String p, Object o) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/core/src/main/java/org/apache/cxf/staxutils/transform/OutTransformWriter.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/staxutils/transform/OutTransformWriter.java b/core/src/main/java/org/apache/cxf/staxutils/transform/OutTransformWriter.java
index 88bc7bb..c4541bf 100644
--- a/core/src/main/java/org/apache/cxf/staxutils/transform/OutTransformWriter.java
+++ b/core/src/main/java/org/apache/cxf/staxutils/transform/OutTransformWriter.java
@@ -398,11 +398,8 @@ public class OutTransformWriter extends DelegatingXMLStreamWriter {
     }
 
     private boolean matchesDropped(boolean shallow) {
-        if ((dropDepth > 0 && dropDepth <= currentDepth) 
-            || (shallow && (elementsStack.size() > 0 && dropElements.contains(elementsStack.get(0))))) {
-            return true;
-        }
-        return false;
+        return (dropDepth > 0 && dropDepth <= currentDepth) 
+            || (shallow && (elementsStack.size() > 0 && dropElements.contains(elementsStack.get(0))));
     }
     
     

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/integration/jca/src/main/java/org/apache/cxf/jca/cxf/ManagedConnectionImpl.java
----------------------------------------------------------------------
diff --git a/integration/jca/src/main/java/org/apache/cxf/jca/cxf/ManagedConnectionImpl.java b/integration/jca/src/main/java/org/apache/cxf/jca/cxf/ManagedConnectionImpl.java
index b504a72..58a4358 100644
--- a/integration/jca/src/main/java/org/apache/cxf/jca/cxf/ManagedConnectionImpl.java
+++ b/integration/jca/src/main/java/org/apache/cxf/jca/cxf/ManagedConnectionImpl.java
@@ -164,10 +164,7 @@ public class ManagedConnectionImpl
         if (cls == null) {
             return false;
         }
-        if (null != cls.getAnnotation(WebService.class)) {
-            return true;
-        }
-        return false;
+        return null != cls.getAnnotation(WebService.class);
     }
     
     public boolean isBound() {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/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 5c60479..1bc611a 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
@@ -144,11 +144,7 @@ public class CXFConnectionSpec implements ConnectionRequestInfo {
             return false;
         }
         
-        if (!ObjectUtils.equals(that.getAddress(), address)) {
-            return false;
-        }
- 
-        return true;
+        return ObjectUtils.equals(that.getAddress(), address);
     }
 
     // Required by JCA Spec

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/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 cbc6cf4..19f7e8b 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
@@ -121,11 +121,7 @@ public class ManagedConnectionFactoryImpl implements ManagedConnectionFactory,
         
         ManagedConnectionFactoryImpl that = (ManagedConnectionFactoryImpl)o;
        
-        if (!ObjectUtils.equals(that.getBusConfigURL(), busConfigURL)) {
-            return false;
-        }
-        
-        return true;
+        return ObjectUtils.equals(that.getBusConfigURL(), busConfigURL);
     }
     
     public PrintWriter getLogWriter() throws ResourceException {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/integration/jca/src/main/java/org/apache/cxf/jca/servant/EJBEndpoint.java
----------------------------------------------------------------------
diff --git a/integration/jca/src/main/java/org/apache/cxf/jca/servant/EJBEndpoint.java b/integration/jca/src/main/java/org/apache/cxf/jca/servant/EJBEndpoint.java
index 4f7d6cf..cd17900 100644
--- a/integration/jca/src/main/java/org/apache/cxf/jca/servant/EJBEndpoint.java
+++ b/integration/jca/src/main/java/org/apache/cxf/jca/servant/EJBEndpoint.java
@@ -150,10 +150,7 @@ public class EJBEndpoint {
         if (cls == null) {
             return false;
         }
-        if (null != cls.getAnnotation(WebService.class)) {
-            return true;
-        }
-        return false;
+        return null != cls.getAnnotation(WebService.class);
     }
 
     public String getEjbServantBaseURL() {
@@ -165,10 +162,7 @@ public class EJBEndpoint {
     }
     
     private static boolean isNotNull(String value) {
-        if (value != null && !"".equals(value.trim())) {
-            return true;
-        }
-        return false;
+        return value != null && !"".equals(value.trim());
     }
 
     public WorkManager getWorkManager() {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index 4bc5718..71d4984 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -347,12 +347,12 @@
                         <dependency>
                             <groupId>net.sourceforge.pmd</groupId>
                             <artifactId>pmd-core</artifactId>
-                            <version>5.2.3</version>
+                            <version>5.3.0</version>
                         </dependency>
                         <dependency>
                             <groupId>net.sourceforge.pmd</groupId>
                             <artifactId>pmd-java</artifactId>
-                            <version>5.2.3</version>
+                            <version>5.3.0</version>
                         </dependency>
                     </dependencies>
                     <configuration>

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/utils/CorbaUtils.java
----------------------------------------------------------------------
diff --git a/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/utils/CorbaUtils.java b/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/utils/CorbaUtils.java
index a51354e..a672de3 100644
--- a/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/utils/CorbaUtils.java
+++ b/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/utils/CorbaUtils.java
@@ -483,10 +483,7 @@ public final class CorbaUtils {
     }
 
     public static boolean isIOR(String location) {
-        if ((location.startsWith("ior:")) || (location.startsWith("IOR:"))) {
-            return true;
-        }
-        return false;
+        return location.startsWith("ior:") || location.startsWith("IOR:");
     }
 
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanTypeInfo.java
----------------------------------------------------------------------
diff --git a/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanTypeInfo.java b/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanTypeInfo.java
index 96a4e4d..a5f2a3b 100644
--- a/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanTypeInfo.java
+++ b/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanTypeInfo.java
@@ -120,11 +120,7 @@ public class BeanTypeInfo {
     }
 
     public boolean isMapped(PropertyDescriptor pd) {
-        if (pd.getReadMethod() == null) {
-            return false;
-        }
-
-        return true;
+        return pd.getReadMethod() != null;
     }
 
     protected void mapProperty(PropertyDescriptor pd) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws1/BeanA.java
----------------------------------------------------------------------
diff --git a/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws1/BeanA.java b/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws1/BeanA.java
index 51a375c..83a4fc6 100644
--- a/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws1/BeanA.java
+++ b/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws1/BeanA.java
@@ -44,11 +44,7 @@ public class BeanA implements java.io.Serializable {
 
         final BeanA beanA = (BeanA)o;
 
-        if ((propA != null) ? (!propA.equals(beanA.propA)) : (beanA.propA != null)) {
-            return false;
-        }
-
-        return true;
+        return !((propA != null) ? (!propA.equals(beanA.propA)) : (beanA.propA != null));
     }
 
     public int hashCode() {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws1/BeanB.java
----------------------------------------------------------------------
diff --git a/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws1/BeanB.java b/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws1/BeanB.java
index b7fd78d..df38063 100644
--- a/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws1/BeanB.java
+++ b/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws1/BeanB.java
@@ -47,11 +47,7 @@ public class BeanB extends BeanA {
 
         final BeanB beanB = (BeanB)o;
 
-        if ((propB != null) ? (!propB.equals(beanB.propB)) : (beanB.propB != null)) {
-            return false;
-        }
-
-        return true;
+        return !((propB != null) ? (!propB.equals(beanB.propB)) : (beanB.propB != null));
     }
 
     public int hashCode() {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws1/BeanC.java
----------------------------------------------------------------------
diff --git a/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws1/BeanC.java b/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws1/BeanC.java
index 501ea5a..89eb648 100644
--- a/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws1/BeanC.java
+++ b/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws1/BeanC.java
@@ -56,11 +56,7 @@ public class BeanC extends BeanB {
 
         final BeanC beanC = (BeanC)o;
 
-        if ((propC != null) ? (!propC.equals(beanC.propC)) : (beanC.propC != null)) {
-            return false;
-        }
-
-        return true;
+        return !((propC != null) ? (!propC.equals(beanC.propC)) : (beanC.propC != null));
     }
 
     public int hashCode() {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws1/ResultBean.java
----------------------------------------------------------------------
diff --git a/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws1/ResultBean.java b/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws1/ResultBean.java
index baa2d78..691704f 100644
--- a/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws1/ResultBean.java
+++ b/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws1/ResultBean.java
@@ -53,11 +53,7 @@ public class ResultBean {
         if (!Arrays.equals(result1, that.result1)) {
             return false;
         }
-        if (!Arrays.equals(result2, that.result2)) {
-            return false;
-        }
-
-        return true;
+        return Arrays.equals(result2, that.result2);
     }
 
     public int hashCode() {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws1/RootBean.java
----------------------------------------------------------------------
diff --git a/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws1/RootBean.java b/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws1/RootBean.java
index b3e6fa6..ca53c6d 100644
--- a/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws1/RootBean.java
+++ b/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws1/RootBean.java
@@ -55,11 +55,7 @@ public class RootBean {
         if (child != null ? !child.equals(rootBean.child) : rootBean.child != null) {
             return false;
         }
-        if (id != null ? !id.equals(rootBean.id) : rootBean.id != null) {
-            return false;
-        }
-
-        return true;
+        return !(id != null ? !id.equals(rootBean.id) : rootBean.id != null);
     }
 
     public int hashCode() {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws1/WS1Exception.java
----------------------------------------------------------------------
diff --git a/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws1/WS1Exception.java b/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws1/WS1Exception.java
index b015375..68dfe51 100644
--- a/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws1/WS1Exception.java
+++ b/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws1/WS1Exception.java
@@ -79,11 +79,7 @@ public class WS1Exception extends Exception {
             return false;
         }
 
-        if (errorCode != that.errorCode) {
-            return false;
-        }
-
-        return true;
+        return errorCode == that.errorCode;
     }
 
     public int hashCode() {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws1/WS1ExtendedException.java
----------------------------------------------------------------------
diff --git a/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws1/WS1ExtendedException.java b/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws1/WS1ExtendedException.java
index f80e018..522090a 100644
--- a/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws1/WS1ExtendedException.java
+++ b/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws1/WS1ExtendedException.java
@@ -65,11 +65,7 @@ public class WS1ExtendedException extends WS1Exception {
 
         final WS1ExtendedException that = (WS1ExtendedException)o;
 
-        if (extendedCode != that.extendedCode) {
-            return false;
-        }
-
-        return true;
+        return extendedCode == that.extendedCode;
     }
 
     public int hashCode() {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws2/common/ParentBean.java
----------------------------------------------------------------------
diff --git a/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws2/common/ParentBean.java b/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws2/common/ParentBean.java
index 2bc5eed..d29a25e 100644
--- a/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws2/common/ParentBean.java
+++ b/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws2/common/ParentBean.java
@@ -66,11 +66,7 @@ public class ParentBean {
         if (content != null ? !content.equals(that.content) : that.content != null) {
             return false;
         }
-        if (id != null ? !id.equals(that.id) : that.id != null) {
-            return false;
-        }
-
-        return true;
+        return !(id != null ? !id.equals(that.id) : that.id != null);
     }
 
     public int hashCode() {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws2/common/exception/AlreadyExistsException.java
----------------------------------------------------------------------
diff --git a/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws2/common/exception/AlreadyExistsException.java b/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws2/common/exception/AlreadyExistsException.java
index ea1e06a..0a58e2d 100644
--- a/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws2/common/exception/AlreadyExistsException.java
+++ b/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws2/common/exception/AlreadyExistsException.java
@@ -49,11 +49,7 @@ public class AlreadyExistsException extends Exception {
             return false;
         }
 
-        if (id != null ? !id.equals(that.id) : that.id != null) {
-            return false;
-        }
-
-        return true;
+        return !(id != null ? !id.equals(that.id) : that.id != null);
     }
 
     public int hashCode() {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws2/common/exception/NotFoundException.java
----------------------------------------------------------------------
diff --git a/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws2/common/exception/NotFoundException.java b/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws2/common/exception/NotFoundException.java
index c0d4b50..e0752bd 100644
--- a/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws2/common/exception/NotFoundException.java
+++ b/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws2/common/exception/NotFoundException.java
@@ -49,11 +49,7 @@ public class NotFoundException extends Exception {
             return false;
         }
 
-        if (id != null ? !id.equals(that.id) : that.id != null) {
-            return false;
-        }
-
-        return true;
+        return !(id != null ? !id.equals(that.id) : that.id != null);
     }
 
     public int hashCode() {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws2/common/pack1/ContentBean1.java
----------------------------------------------------------------------
diff --git a/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws2/common/pack1/ContentBean1.java b/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws2/common/pack1/ContentBean1.java
index 8a39d58..2d6135f 100644
--- a/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws2/common/pack1/ContentBean1.java
+++ b/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws2/common/pack1/ContentBean1.java
@@ -50,11 +50,7 @@ public class ContentBean1 {
 
         final ContentBean1 that = (ContentBean1)o;
 
-        if (data1 != null ? !data1.equals(that.data1) : that.data1 != null) {
-            return false;
-        }
-
-        return true;
+        return !(data1 != null ? !data1.equals(that.data1) : that.data1 != null);
     }
 
     public int hashCode() {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws2/common/pack2/ContentBean2.java
----------------------------------------------------------------------
diff --git a/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws2/common/pack2/ContentBean2.java b/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws2/common/pack2/ContentBean2.java
index a29c7aa..0d1cde0 100644
--- a/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws2/common/pack2/ContentBean2.java
+++ b/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws2/common/pack2/ContentBean2.java
@@ -56,11 +56,7 @@ public class ContentBean2 extends ContentBean1 {
 
         final ContentBean2 that = (ContentBean2)o;
 
-        if (content2 != null ? !content2.equals(that.content2) : that.content2 != null) {
-            return false;
-        }
-
-        return true;
+        return !(content2 != null ? !content2.equals(that.content2) : that.content2 != null);
     }
 
     public int hashCode() {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
----------------------------------------------------------------------
diff --git a/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java b/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
index b7b0478..f66baee 100644
--- a/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
+++ b/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
@@ -786,10 +786,7 @@ public final class JAXBEncoderDecoder {
     }
 
     private static boolean isList(Type cls) {
-        if (cls instanceof ParameterizedType) {
-            return true;
-        }
-        return false;
+        return cls instanceof ParameterizedType;
     }
     private static boolean isList(MessagePartInfo part) {
         if (part.getTypeClass().isArray() && !part.getTypeClass().getComponentType().isPrimitive()) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/MultipartProvider.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/MultipartProvider.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/MultipartProvider.java
index 91e2c96..643979f 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/MultipartProvider.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/MultipartProvider.java
@@ -125,15 +125,12 @@ public class MultipartProvider extends AbstractConfigurableProvider
     
     private boolean isSupported(Class<?> type, Type genericType, Annotation[] anns, 
                                 MediaType mt) {
-        if (mediaTypeSupported(mt) 
+        return mediaTypeSupported(mt) 
             && (WELL_KNOWN_MULTIPART_CLASSES.contains(type)
                 || Collection.class.isAssignableFrom(type)
                 || Map.class.isAssignableFrom(type) && type != MultivaluedMap.class
                 || AnnotationUtils.getAnnotation(anns, Multipart.class) != null
-                || MessageUtils.isTrue(mc.getContextualProperty(SUPPORT_TYPE_AS_MULTIPART)))) {
-            return true;
-        }
-        return false;
+                || MessageUtils.isTrue(mc.getContextualProperty(SUPPORT_TYPE_AS_MULTIPART)));
     }
 
     protected void checkContentLength() {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/RequestDispatcherProvider.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/RequestDispatcherProvider.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/RequestDispatcherProvider.java
index c7b33e6..d13486e 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/RequestDispatcherProvider.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/RequestDispatcherProvider.java
@@ -144,10 +144,7 @@ public class RequestDispatcherProvider extends AbstractConfigurableProvider
                 }
             }
         }
-        if (mc != null && mc.get(MESSAGE_RESOURCE_PATH_PROPERTY) != null) {
-            return true;
-        }
-        return false;
+        return mc != null && mc.get(MESSAGE_RESOURCE_PATH_PROPERTY) != null;
     }
 
     private boolean classResourceSupported(Class<?> type) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ExceptionUtils.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ExceptionUtils.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ExceptionUtils.java
index 20977ee..5e9c257 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ExceptionUtils.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ExceptionUtils.java
@@ -57,11 +57,7 @@ public final class ExceptionUtils {
             return true;
         }
 
-        if (Boolean.TRUE.equals(value) || "true".equalsIgnoreCase(value.toString())) {
-            return true;
-        }
-        
-        return false;
+        return Boolean.TRUE.equals(value) || "true".equalsIgnoreCase(value.toString());
     }
     
     

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java
index 3aac1a0..08e63fb 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java
@@ -622,12 +622,9 @@ public final class JAXRSUtils {
     }
     
     private static boolean matchHttpMethod(String expectedMethod, String httpMethod) {
-        if (expectedMethod.equalsIgnoreCase(httpMethod) 
+        return expectedMethod.equalsIgnoreCase(httpMethod) 
             || headMethodPossible(expectedMethod, httpMethod)
-            || expectedMethod.equals(DefaultMethod.class.getSimpleName())) {
-            return true;
-        }
-        return false;
+            || expectedMethod.equals(DefaultMethod.class.getSimpleName());
     }
     
     public static boolean headMethodPossible(String expectedMethod, String httpMethod) {
@@ -1400,11 +1397,8 @@ public final class JAXRSUtils {
                                          MediaType acceptContentType, 
                                          OperationResourceInfo ori) {
         
-        if (intersectMimeTypes(ori.getConsumeTypes(), requestContentType).size() != 0
-            && intersectMimeTypes(ori.getProduceTypes(), acceptContentType).size() != 0) {
-            return true;
-        }
-        return false;
+        return intersectMimeTypes(ori.getConsumeTypes(), requestContentType).size() != 0
+            && intersectMimeTypes(ori.getProduceTypes(), acceptContentType).size() != 0;
     }
 
     public static List<MediaType> parseMediaTypes(String types) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/multipart/AttachmentUtils.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/multipart/AttachmentUtils.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/multipart/AttachmentUtils.java
index 765102a..6b89115 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/multipart/AttachmentUtils.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/multipart/AttachmentUtils.java
@@ -188,10 +188,7 @@ public final class AttachmentUtils {
             return true;
         }
         ContentDisposition cd = at.getContentDisposition();
-        if (cd != null && value.equals(cd.getParameter("name"))) {
-            return true;
-        }
-        return false;
+        return cd != null && value.equals(cd.getParameter("name"));
     }
 
     public static MultivaluedMap<String, String> populateFormMap(MessageContext mc, 

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/WSDLGetInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/WSDLGetInterceptor.java b/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/WSDLGetInterceptor.java
index 37e2af8..c50608f 100644
--- a/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/WSDLGetInterceptor.java
+++ b/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/WSDLGetInterceptor.java
@@ -132,10 +132,6 @@ public class WSDLGetInterceptor extends AbstractPhaseInterceptor<Message> {
     }
 
     private boolean isRecognizedQuery(Map<String, String> map) {
-
-        if (map.containsKey("wsdl") || map.containsKey("xsd")) {
-            return true;
-        }
-        return false;
+        return map.containsKey("wsdl") || map.containsKey("xsd");
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/javascript/javascript-rt/src/main/java/org/apache/cxf/javascript/JavascriptGetInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/javascript/javascript-rt/src/main/java/org/apache/cxf/javascript/JavascriptGetInterceptor.java b/rt/javascript/javascript-rt/src/main/java/org/apache/cxf/javascript/JavascriptGetInterceptor.java
index a4aa43b..5753a25 100644
--- a/rt/javascript/javascript-rt/src/main/java/org/apache/cxf/javascript/JavascriptGetInterceptor.java
+++ b/rt/javascript/javascript-rt/src/main/java/org/apache/cxf/javascript/JavascriptGetInterceptor.java
@@ -97,10 +97,7 @@ public class JavascriptGetInterceptor extends AbstractPhaseInterceptor<Message>
         if (uri == null) {
             return false;
         }
-        if (map.containsKey(CODE_QUERY_KEY)) {
-            return true;
-        }
-        return false;
+        return map.containsKey(CODE_QUERY_KEY);
     }
     
     public static void writeUtilsToResponseStream(Class<?> referenceClass, OutputStream outputStream) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/Subscription.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/Subscription.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/Subscription.java
index 4177237..c8009e4 100644
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/Subscription.java
+++ b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/Subscription.java
@@ -62,11 +62,7 @@ public class Subscription {
 
         Subscription that = (Subscription)o;
 
-        if (id != null ? !id.equals(that.id) : that.id != null) {
-            return false;
-        }
-
-        return true;
+        return !(id != null ? !id.equals(that.id) : that.id != null);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPushEngine.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPushEngine.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPushEngine.java
index 7355c47..5a6a788 100644
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPushEngine.java
+++ b/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPushEngine.java
@@ -118,11 +118,7 @@ final class AtomPushEngine {
             //System.err.println("converter is not set");
             return false;
         }
-        if (executor.isShutdown()) {
-            //System.err.println("engine shutdown");
-            return false;
-        }
-        return true;
+        return !executor.isShutdown();
     }
 
     private void publishBatch(final List<LogRecord> batch,

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/management/src/main/java/org/apache/cxf/management/interceptor/AbstractMessageResponseTimeInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/management/src/main/java/org/apache/cxf/management/interceptor/AbstractMessageResponseTimeInterceptor.java b/rt/management/src/main/java/org/apache/cxf/management/interceptor/AbstractMessageResponseTimeInterceptor.java
index c6e7c13..bbfd589 100644
--- a/rt/management/src/main/java/org/apache/cxf/management/interceptor/AbstractMessageResponseTimeInterceptor.java
+++ b/rt/management/src/main/java/org/apache/cxf/management/interceptor/AbstractMessageResponseTimeInterceptor.java
@@ -154,10 +154,7 @@ public abstract class AbstractMessageResponseTimeInterceptor extends AbstractPha
         ObjectName serviceCounterName = getServiceCounterName(ex);
         Counter serviceCounter = counterRepo.getCounter(serviceCounterName);
         //If serviceCounter is null, we need to wait ResponseTimeOutInterceptor to create it , hence set to true
-        if (serviceCounter == null || serviceCounter.isEnabled()) {
-            return true;
-        }
-        return false;   
+        return serviceCounter == null || serviceCounter.isEnabled();
     }
     
     protected ObjectName getOperationCounterName(Exchange ex, ObjectName sericeCounterName) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/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 f18530f..bb70bad 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
@@ -270,11 +270,8 @@ public class ClientProxyImpl extends AbstractClient implements
         if (p.getType() == ParameterType.CONTEXT) {
             return true;
         }
-        if (p.getType() == ParameterType.REQUEST_BODY 
-            && m.getParameterTypes()[p.getIndex()] == AsyncResponse.class) {
-            return true;
-        }
-        return false;
+        return p.getType() == ParameterType.REQUEST_BODY 
+            && m.getParameterTypes()[p.getIndex()] == AsyncResponse.class;
     }
     
     private static int getBodyIndex(MultivaluedMap<ParameterType, Parameter> map, 

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/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 c1c7237..46823b8 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
@@ -564,10 +564,7 @@ public class AtomPojoProvider extends AbstractConfigurableProvider
     }
     
     protected boolean isFeedRequested(MediaType mt) {
-        if ("entry".equalsIgnoreCase(mt.getParameters().get("type"))) {
-            return false;
-        }
-        return true;
+        return !"entry".equalsIgnoreCase(mt.getParameters().get("type"));
     }
 
     public void setAtomWriters(Map<String, AtomElementWriter<?, ?>> writers) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/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 5721c8b..74c7a68 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
@@ -233,10 +233,7 @@ public abstract class AbstractSearchConditionParser<T> implements SearchConditio
     private boolean paramConverterAvailable(Class<?> pClass) {
         Message m = JAXRSUtils.getCurrentMessage();
         ServerProviderFactory pf = m == null ? null : ServerProviderFactory.getInstance(m);
-        if (pf != null && pf.createParameterHandler(pClass, pClass, EMPTY_ANNOTTAIONS) != null) {
-            return true;
-        }
-        return false;
+        return pf != null && pf.createParameterHandler(pClass, pClass, EMPTY_ANNOTTAIONS) != null;
     }
 
     private CollectionCheck getCollectionCheck(String propName, boolean isCollection, Class<?> actualCls) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/data/Client.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/data/Client.java b/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/data/Client.java
index 6fd429c..b1c4676 100644
--- a/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/data/Client.java
+++ b/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/data/Client.java
@@ -157,11 +157,7 @@ public class Client {
         if (!consumerKey.equals(that.consumerKey)) {
             return false;
         }
-        if (!secretKey.equals(that.secretKey)) {
-            return false;
-        }
-
-        return true;
+        return secretKey.equals(that.secretKey);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/AbstractSSOSpHandler.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/AbstractSSOSpHandler.java b/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/AbstractSSOSpHandler.java
index 548ea6e..d9d4572 100644
--- a/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/AbstractSSOSpHandler.java
+++ b/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/AbstractSSOSpHandler.java
@@ -133,11 +133,7 @@ public class AbstractSSOSpHandler {
             return true;
         }
         
-        if (expiresAt > 0 && currentTime.after(new Date(expiresAt))) {
-            return true;
-        }
-        
-        return false;
+        return expiresAt > 0 && currentTime.after(new Date(expiresAt));
     }
     
     public void setStateProvider(SPStateManager stateProvider) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/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 4b9adc1..1d9ae9c 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
@@ -1552,10 +1552,7 @@ public abstract class HTTPConduit
                 return true;
             }
             // 2. Robust OneWays could have a fault
-            if (responseCode == 500 && MessageUtils.getContextualBoolean(message, Message.ROBUST_ONEWAY, false)) {
-                return true;
-            }
-            return false;
+            return responseCode == 500 && MessageUtils.getContextualBoolean(message, Message.ROBUST_ONEWAY, false);
         }
 
         protected void handleResponseInternal() throws IOException {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/transports/http/src/main/java/org/apache/cxf/transport/https/AllowAllHostnameVerifier.java
----------------------------------------------------------------------
diff --git a/rt/transports/http/src/main/java/org/apache/cxf/transport/https/AllowAllHostnameVerifier.java b/rt/transports/http/src/main/java/org/apache/cxf/transport/https/AllowAllHostnameVerifier.java
index cfabf5f..5b660bf 100644
--- a/rt/transports/http/src/main/java/org/apache/cxf/transport/https/AllowAllHostnameVerifier.java
+++ b/rt/transports/http/src/main/java/org/apache/cxf/transport/https/AllowAllHostnameVerifier.java
@@ -34,14 +34,9 @@ class AllowAllHostnameVerifier implements javax.net.ssl.HostnameVerifier {
     public boolean verify(String host, SSLSession session) {
         try {
             Certificate[] certs = session.getPeerCertificates();
-            if (certs != null && certs[0] instanceof X509Certificate) {
-                return true;
-            }
-            return false;
+            return certs != null && certs[0] instanceof X509Certificate;
         } catch (SSLException e) {
             return false;
         }
     }
-
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/MAPAggregatorImpl.java
----------------------------------------------------------------------
diff --git a/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/MAPAggregatorImpl.java b/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/MAPAggregatorImpl.java
index 15ca563..e013431 100644
--- a/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/MAPAggregatorImpl.java
+++ b/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/MAPAggregatorImpl.java
@@ -243,12 +243,7 @@ public class MAPAggregatorImpl extends MAPAggregator {
         if (null == aim) {
             return false;            
         }
-        if (null == aim.get(MetadataConstants.ADDRESSING_ASSERTION_QNAME)) {
-            return false;
-        }
-        // no need to analyse the content of the Addressing assertion here
-        
-        return true;
+        return null != aim.get(MetadataConstants.ADDRESSING_ASSERTION_QNAME);
     }
     
     /**
@@ -271,10 +266,7 @@ public class MAPAggregatorImpl extends MAPAggregator {
         if (null != aim.get(MetadataConstants.USING_ADDRESSING_2005_QNAME)) {
             return true;
         }
-        if (null != aim.get(MetadataConstants.USING_ADDRESSING_2006_QNAME)) {
-            return true;
-        } 
-        return false;
+        return null != aim.get(MetadataConstants.USING_ADDRESSING_2006_QNAME);
     }
 
    

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/DecoupledFaultHandler.java
----------------------------------------------------------------------
diff --git a/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/DecoupledFaultHandler.java b/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/DecoupledFaultHandler.java
index 92043ab..483a46b 100644
--- a/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/DecoupledFaultHandler.java
+++ b/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/DecoupledFaultHandler.java
@@ -94,9 +94,6 @@ public class DecoupledFaultHandler extends AbstractSoapInterceptor {
     }
     
     private boolean isWSAHeader(Header header) {
-        if (header.getName().getNamespaceURI().startsWith(Names.WSA_NAMESPACE_NAME)) {
-            return true;
-        }
-        return false;
+        return header.getName().getNamespaceURI().startsWith(Names.WSA_NAMESPACE_NAME);
     }
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/attachment/external/URIDomainExpression.java
----------------------------------------------------------------------
diff --git a/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/attachment/external/URIDomainExpression.java b/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/attachment/external/URIDomainExpression.java
index 1c2a412..a2d8fe1 100644
--- a/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/attachment/external/URIDomainExpression.java
+++ b/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/attachment/external/URIDomainExpression.java
@@ -50,12 +50,9 @@ public class URIDomainExpression implements DomainExpression {
             && wsdl11XPointer.matchesService(si.getTargetNamespace(), si.getName().getLocalPart())) {
             return true;
         }
-        if ((si.getInterface() != null) && (si.getInterface().getName() != null)
+        return (si.getInterface() != null) && (si.getInterface().getName() != null)
             && wsdl11XPointer.matchesPortType(si.getTargetNamespace(),
-                                              si.getInterface().getName().getLocalPart())) {
-            return true;
-        }
-        return false;
+                                              si.getInterface().getName().getLocalPart());
     }
 
     @Override
@@ -63,13 +60,10 @@ public class URIDomainExpression implements DomainExpression {
         if (ei == null) {
             return false;
         }
-        if ((ei.getService() != null) && (ei.getService().getName() != null) && (ei.getName() != null)
+        return (ei.getService() != null) && (ei.getService().getName() != null) && (ei.getName() != null)
             && wsdl11XPointer.matchesPort(ei.getService().getTargetNamespace(),
                                           ei.getService().getName().getLocalPart(),
-                                          ei.getName().getLocalPart())) {
-            return true;
-        }
-        return false;
+                                          ei.getName().getLocalPart());
     }
     
     @Override
@@ -90,15 +84,12 @@ public class URIDomainExpression implements DomainExpression {
                         boi.getName().getLocalPart())) {
             return true;
         }
-        if ((boi.getOperationInfo() != null) && (boi.getOperationInfo().getInterface() != null) 
+        return (boi.getOperationInfo() != null) && (boi.getOperationInfo().getInterface() != null) 
             && (boi.getOperationInfo().getInterface().getName() != null) && (boi.getOperationInfo().getName() != null)
             && wsdl11XPointer.matchesPortTypeOperation(
                         boi.getOperationInfo().getInterface().getName().getNamespaceURI(), 
                         boi.getOperationInfo().getInterface().getName().getLocalPart(), 
-                        boi.getOperationInfo().getName().getLocalPart())) {
-            return true;
-        }
-        return false;
+                        boi.getOperationInfo().getName().getLocalPart());
     }
 
     @Override
@@ -117,10 +108,7 @@ public class URIDomainExpression implements DomainExpression {
             return true;
         }
                 
-        if (checkPortTypeOperationInOut(bmi)) {
-            return true;
-        }
-        return false;
+        return checkPortTypeOperationInOut(bmi);
     }
 
 
@@ -134,10 +122,7 @@ public class URIDomainExpression implements DomainExpression {
             return true;
         }
         
-        if (checkPortTypeOperationFault(bfi)) {
-            return true;
-        }        
-        return false;
+        return checkPortTypeOperationFault(bfi);
     }
 
     private boolean checkBindingOperationInOut(BindingMessageInfo bmi) {
@@ -196,21 +181,18 @@ public class URIDomainExpression implements DomainExpression {
             ini = bfi.getBindingOperation().getOperationInfo().getInterface();
         }
 
-        if ((ini != null) && (ini.getName() != null)
+        return (ini != null) && (ini.getName() != null)
             && (bfi.getBindingOperation().getName() != null)
             && (bfi.getFaultInfo().getFaultName() != null)
             && wsdl11XPointer.matchesPortTypeOperationFault(
                       ini.getName().getNamespaceURI(),
                       ini.getName().getLocalPart(),
                       bfi.getBindingOperation().getName().getLocalPart(),
-                      bfi.getFaultInfo().getFaultName().getLocalPart())) {
-            return true;
-        }
-        return false;
+                      bfi.getFaultInfo().getFaultName().getLocalPart());
     }
 
     private boolean checkBindingOperationFault(BindingFaultInfo bfi) {
-        if ((bfi.getFaultInfo() != null) && (bfi.getFaultInfo().getFaultName() != null)
+        return (bfi.getFaultInfo() != null) && (bfi.getFaultInfo().getFaultName() != null)
             &&  (bfi.getBindingOperation().getName() != null)
             && (bfi.getBindingOperation().getBinding() != null) 
             && (bfi.getBindingOperation().getBinding().getName() != null)
@@ -218,10 +200,7 @@ public class URIDomainExpression implements DomainExpression {
                       bfi.getFaultInfo().getFaultName().getNamespaceURI(),
                       bfi.getBindingOperation().getBinding().getName().getLocalPart(),
                       bfi.getBindingOperation().getName().getLocalPart(),
-                      bfi.getFaultInfo().getFaultName().getLocalPart())) {
-            return true;
-        }
-        return false;
+                      bfi.getFaultInfo().getFaultName().getLocalPart());
     }
 
     public static class Wsdl11XPointer {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/AbstractRMInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/AbstractRMInterceptor.java b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/AbstractRMInterceptor.java
index 894fb95..b14ced7 100644
--- a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/AbstractRMInterceptor.java
+++ b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/AbstractRMInterceptor.java
@@ -124,10 +124,7 @@ public abstract class AbstractRMInterceptor<T extends Message> extends AbstractP
         if (assertionMap == null) {
             return false;
         }
-        if (!RMPolicyUtilities.collectRMAssertions(assertionMap).isEmpty()) {
-            return true;
-        }
-        return false;
+        return !RMPolicyUtilities.collectRMAssertions(assertionMap).isEmpty();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/PolicyUtils.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/PolicyUtils.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/PolicyUtils.java
index 6bed02e..48a1e61 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/PolicyUtils.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/PolicyUtils.java
@@ -104,11 +104,7 @@ public final class PolicyUtils {
         Collection<AssertionInfo> sp11Ais = aim.get(new QName(SP11Constants.SP_NS, localname));
         Collection<AssertionInfo> sp12Ais = aim.get(new QName(SP12Constants.SP_NS, localname));
 
-        if ((sp11Ais != null && !sp11Ais.isEmpty()) || (sp12Ais != null && !sp12Ais.isEmpty())) {
-            return true;
-        }
-
-        return false;
+        return (sp11Ais != null && !sp11Ais.isEmpty()) || (sp12Ais != null && !sp12Ais.isEmpty());
     }
     
     public static AbstractBinding getSecurityBinding(AssertionInfoMap aim) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSUtils.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSUtils.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSUtils.java
index f9fda5f..670d95d 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSUtils.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSUtils.java
@@ -157,11 +157,7 @@ public final class STSUtils {
     }
 
     public static boolean configureViaEPR(STSClient client, EndpointReferenceType epr) {
-        if (epr != null && client.getLocation() == null && client.getWsdlLocation() == null) {
-            return true;
-        }
-            
-        return false;
+        return epr != null && client.getLocation() == null && client.getWsdlLocation() == null;
     }
     
     private static STSClient createSTSClient(Message message, String type) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractTokenInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractTokenInterceptor.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractTokenInterceptor.java
index 7501ce7..258d043 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractTokenInterceptor.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractTokenInterceptor.java
@@ -137,10 +137,7 @@ public abstract class AbstractTokenInterceptor extends AbstractSoapInterceptor {
     protected boolean isTLSInUse(SoapMessage message) {
         // See whether TLS is in use or not
         TLSSessionInfo tlsInfo = message.get(TLSSessionInfo.class);
-        if (tlsInfo != null) {
-            return true;
-        }
-        return false;
+        return tlsInfo != null;
     }
     
     protected TokenStore getTokenStore(SoapMessage message) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JInInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JInInterceptor.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JInInterceptor.java
index c4c8b37..ad65a3c 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JInInterceptor.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JInInterceptor.java
@@ -927,11 +927,7 @@ public class PolicyBasedWSS4JInInterceptor extends WSS4JInInterceptor {
         }
         
         ai = PolicyUtils.getFirstAssertionByLocalname(aim, SPConstants.CONTENT_ENCRYPTED_ELEMENTS);
-        if (ai != null) {
-            return true;
-        }
-        
-        return false;
+        return ai != null;
     }
 
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/StaxCryptoCoverageChecker.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/StaxCryptoCoverageChecker.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/StaxCryptoCoverageChecker.java
index d4c901c..14c60c5 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/StaxCryptoCoverageChecker.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/StaxCryptoCoverageChecker.java
@@ -321,90 +321,62 @@ public class StaxCryptoCoverageChecker extends AbstractPhaseInterceptor<SoapMess
     }
     
     private boolean isEnvelope(QName qname) {
-        if ("Envelope".equals(qname.getLocalPart())
+        return "Envelope".equals(qname.getLocalPart())
             && (SOAP_NS.equals(qname.getNamespaceURI()) 
-                || SOAP12_NS.equals(qname.getNamespaceURI()))) {
-            return true;
-        }
-        return false;
+                || SOAP12_NS.equals(qname.getNamespaceURI()));
     }
     
     private boolean isSoapHeader(QName qname) {
-        if ("Header".equals(qname.getLocalPart())
+        return "Header".equals(qname.getLocalPart())
             && (SOAP_NS.equals(qname.getNamespaceURI()) 
-                || SOAP12_NS.equals(qname.getNamespaceURI()))) {
-            return true;
-        }
-        return false;
+                || SOAP12_NS.equals(qname.getNamespaceURI()));
     }
     
     private boolean isSecurityHeader(QName qname) {
-        if ("Security".equals(qname.getLocalPart()) && WSSE_NS.equals(qname.getNamespaceURI())) {
-            return true;
-        }
-        return false;
+        return "Security".equals(qname.getLocalPart()) && WSSE_NS.equals(qname.getNamespaceURI());
     }
     
     private boolean isTimestamp(List<QName> qnames) {
-        if (qnames != null && qnames.size() == 4
+        return qnames != null 
+            && qnames.size() == 4
             && isEnvelope(qnames.get(0))
             && isSoapHeader(qnames.get(1))
             && isSecurityHeader(qnames.get(2))
             && "Timestamp".equals(qnames.get(3).getLocalPart())
-            && WSU_NS.equals(qnames.get(3).getNamespaceURI())) {
-            return true;
-        }
-        
-        return false;
+            && WSU_NS.equals(qnames.get(3).getNamespaceURI());
     }
     
     private boolean isReplyTo(List<QName> qnames) {
-        if (qnames != null && qnames.size() == 3
+        return qnames != null && qnames.size() == 3
             && isEnvelope(qnames.get(0))
             && isSoapHeader(qnames.get(1))
             && "ReplyTo".equals(qnames.get(2).getLocalPart())
-            && WSA_NS.equals(qnames.get(2).getNamespaceURI())) {
-            return true;
-        }
-        
-        return false;
+            && WSA_NS.equals(qnames.get(2).getNamespaceURI());
     }
     
     private boolean isFaultTo(List<QName> qnames) {
-        if (qnames != null && qnames.size() == 3
+        return qnames != null && qnames.size() == 3
             && isEnvelope(qnames.get(0))
             && isSoapHeader(qnames.get(1))
             && "FaultTo".equals(qnames.get(2).getLocalPart())
-            && WSA_NS.equals(qnames.get(2).getNamespaceURI())) {
-            return true;
-        }
-        
-        return false;
+            && WSA_NS.equals(qnames.get(2).getNamespaceURI());
     }
     
     private boolean isBody(List<QName> qnames) {
-        if (qnames != null && qnames.size() == 2
+        return qnames != null && qnames.size() == 2
             && isEnvelope(qnames.get(0))
             && "Body".equals(qnames.get(1).getLocalPart())
             && (SOAP_NS.equals(qnames.get(1).getNamespaceURI()) 
-                || SOAP12_NS.equals(qnames.get(1).getNamespaceURI()))) {
-            return true;
-        }
-
-        return false;
+                || SOAP12_NS.equals(qnames.get(1).getNamespaceURI()));
     }
     
     private boolean isUsernameToken(List<QName> qnames) {
-        if (qnames != null && qnames.size() == 4
+        return qnames != null && qnames.size() == 4
             && isEnvelope(qnames.get(0))
             && isSoapHeader(qnames.get(1))
             && isSecurityHeader(qnames.get(2))
             && "UsernameToken".equals(qnames.get(3).getLocalPart())
-            && WSSE_NS.equals(qnames.get(3).getNamespaceURI())) {
-            return true;
-        }
-        
-        return false;
+            && WSSE_NS.equals(qnames.get(3).getNamespaceURI());
     }
     
     public boolean isSignBody() {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/StaxSecurityContextInInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/StaxSecurityContextInInterceptor.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/StaxSecurityContextInInterceptor.java
index 5ba0457..12d8299 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/StaxSecurityContextInInterceptor.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/StaxSecurityContextInInterceptor.java
@@ -191,12 +191,8 @@ public class StaxSecurityContextInInterceptor extends AbstractPhaseInterceptor<S
         }
         
         // Now check that a PublicKey/X509Certificate was used
-        if (token.getPublicKey() != null 
-            || (token.getX509Certificates() != null && token.getX509Certificates().length > 0)) {
-            return true;
-        }
-        
-        return false;
+        return token.getPublicKey() != null 
+            || (token.getX509Certificates() != null && token.getX509Certificates().length > 0);
     }
     
     private boolean isSamlEventSigned(SamlTokenSecurityEvent event) {
@@ -204,13 +200,9 @@ public class StaxSecurityContextInInterceptor extends AbstractPhaseInterceptor<S
             return false;
         }
         
-        if (event.getSecurityToken() != null 
+        return event.getSecurityToken() != null 
             && event.getSecurityToken().getSamlAssertionWrapper() != null
-            && event.getSecurityToken().getSamlAssertionWrapper().isSigned()) {
-            return true;
-        }
-        
-        return false;
+            && event.getSecurityToken().getSamlAssertionWrapper().isSigned();
     }
     
     private SecurityContext createSecurityContext(final Principal p) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/UsernameTokenInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/UsernameTokenInterceptor.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/UsernameTokenInterceptor.java
index 59f7005..a083eeb 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/UsernameTokenInterceptor.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/UsernameTokenInterceptor.java
@@ -358,11 +358,8 @@ public class UsernameTokenInterceptor extends AbstractTokenInterceptor {
         org.apache.wss4j.policy.model.UsernameToken usernameTokenPolicy
     ) {
         AbstractSecurityAssertion supportingToken = usernameTokenPolicy.getParentAssertion();
-        if (supportingToken instanceof SupportingTokens
-            && ((SupportingTokens)supportingToken).isEndorsing()) {
-            return false;
-        }
-        return true;
+        return !(supportingToken instanceof SupportingTokens
+            && ((SupportingTokens)supportingToken).isEndorsing());
     }
 
     protected void addToken(SoapMessage message) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/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 78a7647..8212eed 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
@@ -451,30 +451,21 @@ public class WSS4JInInterceptor extends AbstractWSS4JInterceptor {
      * Is a Nonce Cache required, i.e. are we expecting a UsernameToken 
      */
     protected boolean isNonceCacheRequired(List<Integer> actions, SoapMessage msg) {
-        if (actions.contains(WSConstants.UT) || actions.contains(WSConstants.UT_NOPASSWORD)) {
-            return true;
-        }
-        return false;
+        return actions.contains(WSConstants.UT) || actions.contains(WSConstants.UT_NOPASSWORD);
     }
     
     /**
      * Is a Timestamp cache required, i.e. are we expecting a Timestamp 
      */
     protected boolean isTimestampCacheRequired(List<Integer> actions, SoapMessage msg) {
-        if (actions.contains(WSConstants.TS)) {
-            return true;
-        }
-        return false;
+        return actions.contains(WSConstants.TS);
     }
     
     /**
      * Is a SAML Cache required, i.e. are we expecting a SAML Token 
      */
     protected boolean isSamlCacheRequired(List<Integer> actions, SoapMessage msg) {
-        if (actions.contains(WSConstants.ST_UNSIGNED) || actions.contains(WSConstants.ST_SIGNED)) {
-            return true;
-        }
-        return false;
+        return actions.contains(WSConstants.ST_UNSIGNED) || actions.contains(WSConstants.ST_SIGNED);
     }
     
     /**

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java
index bfc67e0..944b035 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java
@@ -976,12 +976,8 @@ public class SymmetricBindingHandler extends AbstractBindingBuilder {
     }
     
     private boolean hasSignedPartsOrElements() {
-        if (PolicyUtils.getFirstAssertionByLocalname(aim, SPConstants.SIGNED_PARTS) != null
-            || PolicyUtils.getFirstAssertionByLocalname(aim, SPConstants.SIGNED_ELEMENTS) != null) {
-            return true;
-        }
-        
-        return false;
+        return PolicyUtils.getFirstAssertionByLocalname(aim, SPConstants.SIGNED_PARTS) != null
+            || PolicyUtils.getFirstAssertionByLocalname(aim, SPConstants.SIGNED_ELEMENTS) != null;
     }
 
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/AbstractBindingPolicyValidator.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/AbstractBindingPolicyValidator.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/AbstractBindingPolicyValidator.java
index 55a00b5..f43ab81 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/AbstractBindingPolicyValidator.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/AbstractBindingPolicyValidator.java
@@ -82,10 +82,7 @@ public abstract class AbstractBindingPolicyValidator implements SecurityPolicyVa
         if (includeTimestamp && (timestampResults == null || timestampResults.size() != 1)) {
             return false;
         } else if (!includeTimestamp) {
-            if (timestampResults == null || timestampResults.isEmpty()) {
-                return true;
-            }
-            return false;
+            return timestampResults == null || timestampResults.isEmpty();
         }
         
         // At this point we received a (required) Timestamp. Now check that it is integrity protected.
@@ -239,10 +236,7 @@ public abstract class AbstractBindingPolicyValidator implements SecurityPolicyVa
                 signed = true;
             }
             if (actInt.intValue() == WSConstants.ENCR && el != null) {
-                if (signed) {
-                    return true;
-                }
-                return false;
+                return signed;
             }
         }
         return false;
@@ -265,10 +259,7 @@ public abstract class AbstractBindingPolicyValidator implements SecurityPolicyVa
             // Don't count an endorsing signature
             if (actInt.intValue() == WSConstants.SIGN && el != null
                 && !(el.size() == 1 && el.get(0).getName().equals(SIG_QNAME))) {
-                if (encrypted) {
-                    return true;
-                }
-                return false;
+                return encrypted;
             }
         }
         return false;

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/AbstractSupportingTokenPolicyValidator.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/AbstractSupportingTokenPolicyValidator.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/AbstractSupportingTokenPolicyValidator.java
index ad0c835..982be23 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/AbstractSupportingTokenPolicyValidator.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/AbstractSupportingTokenPolicyValidator.java
@@ -122,16 +122,12 @@ public abstract class AbstractSupportingTokenPolicyValidator extends AbstractSec
             }
         }
         
-        if ((isEndorsing() && !checkEndorsed(tokenResults, parameters.getSignedResults(),
+        return !((isEndorsing() && !checkEndorsed(tokenResults, parameters.getSignedResults(),
                                              parameters.getMessage(),
                                              parameters.getTimestampElement())) 
             || !validateSignedEncryptedPolicies(tokenResults, parameters.getSignedResults(),
                                                 parameters.getEncryptedResults(),
-                                                parameters.getMessage())) {
-            return false;
-        }
-        
-        return true;
+                                                parameters.getMessage()));
     }
     
     
@@ -159,13 +155,9 @@ public abstract class AbstractSupportingTokenPolicyValidator extends AbstractSec
             return false;
         }
         
-        if (!validateSignedEncryptedPolicies(parameters.getSamlResults(), parameters.getSignedResults(),
+        return validateSignedEncryptedPolicies(parameters.getSamlResults(), parameters.getSignedResults(),
                                              parameters.getEncryptedResults(),
-                                             parameters.getMessage())) {
-            return false;
-        }
-        
-        return true;
+                                             parameters.getMessage());
     }
     
     
@@ -218,13 +210,9 @@ public abstract class AbstractSupportingTokenPolicyValidator extends AbstractSec
             return false;
         }
         
-        if (!validateSignedEncryptedPolicies(tokenResults, parameters.getSignedResults(),
+        return validateSignedEncryptedPolicies(tokenResults, parameters.getSignedResults(),
                                              parameters.getEncryptedResults(),
-                                             parameters.getMessage())) {
-            return false;
-        }
-        
-        return true;
+                                             parameters.getMessage());
     }
     
     
@@ -278,13 +266,9 @@ public abstract class AbstractSupportingTokenPolicyValidator extends AbstractSec
             return false;
         }
         
-        if (!validateSignedEncryptedPolicies(tokenResults, parameters.getSignedResults(),
+        return validateSignedEncryptedPolicies(tokenResults, parameters.getSignedResults(),
                                              parameters.getEncryptedResults(),
-                                             parameters.getMessage())) {
-            return false;
-        }
-        
-        return true;
+                                             parameters.getMessage());
     }
     
     /**
@@ -322,13 +306,9 @@ public abstract class AbstractSupportingTokenPolicyValidator extends AbstractSec
             return false;
         }
         
-        if (!validateSignedEncryptedPolicies(tokenResults, parameters.getSignedResults(),
+        return validateSignedEncryptedPolicies(tokenResults, parameters.getSignedResults(),
                                              parameters.getEncryptedResults(),
-                                             parameters.getMessage())) {
-            return false;
-        }
-        
-        return true;
+                                             parameters.getMessage());
     }
     
     /**
@@ -351,12 +331,7 @@ public abstract class AbstractSupportingTokenPolicyValidator extends AbstractSec
             return false;
         }
         
-        if (!validateSignedEncryptedElements(encryptedElements, false, encryptedResults, tokenResults, 
-                                             message)) {
-            return false;
-        }
-        
-        return true;
+        return validateSignedEncryptedElements(encryptedElements, false, encryptedResults, tokenResults, message);
     }
     
     
@@ -399,13 +374,9 @@ public abstract class AbstractSupportingTokenPolicyValidator extends AbstractSec
             return false;
         }
         
-        if (!validateSignedEncryptedPolicies(tokenResults, parameters.getSignedResults(),
+        return validateSignedEncryptedPolicies(tokenResults, parameters.getSignedResults(),
                                              parameters.getEncryptedResults(),
-                                             parameters.getMessage())) {
-            return false;
-        }
-        
-        return true;
+                                             parameters.getMessage());
     }
     
     /**
@@ -462,10 +433,7 @@ public abstract class AbstractSupportingTokenPolicyValidator extends AbstractSec
     private boolean isTLSInUse(Message message) {
         // See whether TLS is in use or not
         TLSSessionInfo tlsInfo = message.get(TLSSessionInfo.class);
-        if (tlsInfo != null) {
-            return true;
-        }
-        return false;
+        return tlsInfo != null;
     }
     
     /**


Mime
View raw message