cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [2/3] cxf git commit: The new PMD plugin is strict about simplifying boolean returns
Date Fri, 03 Apr 2015 16:02:57 GMT
http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/AlgorithmSuitePolicyValidator.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/AlgorithmSuitePolicyValidator.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/AlgorithmSuitePolicyValidator.java
index 5488764..ac8a701 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/AlgorithmSuitePolicyValidator.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/AlgorithmSuitePolicyValidator.java
@@ -52,13 +52,9 @@ public class AlgorithmSuitePolicyValidator extends AbstractSecurityPolicyValidat
      * policy defined by the AssertionInfo parameter
      */
     public boolean canValidatePolicy(AssertionInfo assertionInfo) {
-        if (assertionInfo.getAssertion() != null 
+        return assertionInfo.getAssertion() != null 
             && (SP12Constants.ALGORITHM_SUITE.equals(assertionInfo.getAssertion().getName())
-                || SP11Constants.ALGORITHM_SUITE.equals(assertionInfo.getAssertion().getName()))) {
-            return true;
-        }
-        
-        return false;
+                || SP11Constants.ALGORITHM_SUITE.equals(assertionInfo.getAssertion().getName()));
     }
     
     /**
@@ -136,11 +132,7 @@ public class AlgorithmSuitePolicyValidator extends AbstractSecurityPolicyValidat
             return false;
         }
         
-        if (!checkKeyLengths(result, algorithmPolicy, ai, true)) {
-            return false;
-        }
-        
-        return true;
+        return checkKeyLengths(result, algorithmPolicy, ai, true);
     }
     
     /**
@@ -214,11 +206,7 @@ public class AlgorithmSuitePolicyValidator extends AbstractSecurityPolicyValidat
             }
         }
         
-        if (!checkKeyLengths(result, algorithmPolicy, ai, false)) {
-            return false;
-        }
-        
-        return true;
+        return checkKeyLengths(result, algorithmPolicy, ai, 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/AsymmetricBindingPolicyValidator.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/AsymmetricBindingPolicyValidator.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/AsymmetricBindingPolicyValidator.java
index 2c12a30..bb5c6ec 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/AsymmetricBindingPolicyValidator.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/AsymmetricBindingPolicyValidator.java
@@ -48,13 +48,9 @@ public class AsymmetricBindingPolicyValidator extends AbstractBindingPolicyValid
      * policy defined by the AssertionInfo parameter
      */
     public boolean canValidatePolicy(AssertionInfo assertionInfo) {
-        if (assertionInfo.getAssertion() != null 
+        return assertionInfo.getAssertion() != null 
             && (SP12Constants.ASYMMETRIC_BINDING.equals(assertionInfo.getAssertion().getName())
-                || SP11Constants.ASYMMETRIC_BINDING.equals(assertionInfo.getAssertion().getName()))) {
-            return true;
-        }
-        
-        return false;
+                || SP11Constants.ASYMMETRIC_BINDING.equals(assertionInfo.getAssertion().getName()));
     }
     
     /**

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/ConcreteSupportingTokenPolicyValidator.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/ConcreteSupportingTokenPolicyValidator.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/ConcreteSupportingTokenPolicyValidator.java
index 89517d5..3a1c979 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/ConcreteSupportingTokenPolicyValidator.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/ConcreteSupportingTokenPolicyValidator.java
@@ -46,13 +46,9 @@ public class ConcreteSupportingTokenPolicyValidator extends AbstractSupportingTo
      * policy defined by the AssertionInfo parameter
      */
     public boolean canValidatePolicy(AssertionInfo assertionInfo) {
-        if (assertionInfo.getAssertion() != null 
+        return assertionInfo.getAssertion() != null 
             && (SP12Constants.SUPPORTING_TOKENS.equals(assertionInfo.getAssertion().getName())
-                || SP11Constants.SUPPORTING_TOKENS.equals(assertionInfo.getAssertion().getName()))) {
-            return true;
-        }
-        
-        return false;
+                || SP11Constants.SUPPORTING_TOKENS.equals(assertionInfo.getAssertion().getName()));
     }
     
     /**

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/EncryptedTokenPolicyValidator.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/EncryptedTokenPolicyValidator.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/EncryptedTokenPolicyValidator.java
index 4a52304..adffac4 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/EncryptedTokenPolicyValidator.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/EncryptedTokenPolicyValidator.java
@@ -45,12 +45,8 @@ public class EncryptedTokenPolicyValidator extends AbstractSupportingTokenPolicy
      * policy defined by the AssertionInfo parameter
      */
     public boolean canValidatePolicy(AssertionInfo assertionInfo) {
-        if (assertionInfo.getAssertion() != null 
-            && SP12Constants.ENCRYPTED_SUPPORTING_TOKENS.equals(assertionInfo.getAssertion().getName())) {
-            return true;
-        }
-        
-        return false;
+        return assertionInfo.getAssertion() != null 
+            && SP12Constants.ENCRYPTED_SUPPORTING_TOKENS.equals(assertionInfo.getAssertion().getName());
     }
     
     /**

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/EndorsingEncryptedTokenPolicyValidator.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/EndorsingEncryptedTokenPolicyValidator.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/EndorsingEncryptedTokenPolicyValidator.java
index 9e0ca22..8118289 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/EndorsingEncryptedTokenPolicyValidator.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/EndorsingEncryptedTokenPolicyValidator.java
@@ -49,12 +49,8 @@ public class EndorsingEncryptedTokenPolicyValidator extends AbstractSupportingTo
      */
     public boolean canValidatePolicy(AssertionInfo assertionInfo) {
         QName sp12QName = SP12Constants.ENDORSING_ENCRYPTED_SUPPORTING_TOKENS;
-        if (assertionInfo.getAssertion() != null 
-            && sp12QName.equals(assertionInfo.getAssertion().getName())) {
-            return true;
-        }
-        
-        return false;
+        return assertionInfo.getAssertion() != null 
+            && sp12QName.equals(assertionInfo.getAssertion().getName());
     }
     
     /**

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/EndorsingTokenPolicyValidator.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/EndorsingTokenPolicyValidator.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/EndorsingTokenPolicyValidator.java
index 354ec8b..47cdceb 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/EndorsingTokenPolicyValidator.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/EndorsingTokenPolicyValidator.java
@@ -47,13 +47,9 @@ public class EndorsingTokenPolicyValidator extends AbstractSupportingTokenPolicy
      * policy defined by the AssertionInfo parameter
      */
     public boolean canValidatePolicy(AssertionInfo assertionInfo) {
-        if (assertionInfo.getAssertion() != null 
+        return assertionInfo.getAssertion() != null 
             && (SP12Constants.ENDORSING_SUPPORTING_TOKENS.equals(assertionInfo.getAssertion().getName())
-                || SP11Constants.ENDORSING_SUPPORTING_TOKENS.equals(assertionInfo.getAssertion().getName()))) {
-            return true;
-        }
-        
-        return false;
+                || SP11Constants.ENDORSING_SUPPORTING_TOKENS.equals(assertionInfo.getAssertion().getName()));
     }
     
     /**

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/IssuedTokenPolicyValidator.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/IssuedTokenPolicyValidator.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/IssuedTokenPolicyValidator.java
index dcac606..aed16f9 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/IssuedTokenPolicyValidator.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/IssuedTokenPolicyValidator.java
@@ -59,13 +59,9 @@ public class IssuedTokenPolicyValidator extends AbstractSamlPolicyValidator {
      * policy defined by the AssertionInfo parameter
      */
     public boolean canValidatePolicy(AssertionInfo assertionInfo) {
-        if (assertionInfo.getAssertion() != null 
+        return assertionInfo.getAssertion() != null 
             && (SP12Constants.ISSUED_TOKEN.equals(assertionInfo.getAssertion().getName())
-                || SP11Constants.ISSUED_TOKEN.equals(assertionInfo.getAssertion().getName()))) {
-            return true;
-        }
-        
-        return false;
+                || SP11Constants.ISSUED_TOKEN.equals(assertionInfo.getAssertion().getName()));
     }
     
     /**

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/KerberosTokenPolicyValidator.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/KerberosTokenPolicyValidator.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/KerberosTokenPolicyValidator.java
index e8cb852..af7474c 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/KerberosTokenPolicyValidator.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/KerberosTokenPolicyValidator.java
@@ -55,13 +55,9 @@ public class KerberosTokenPolicyValidator extends AbstractSecurityPolicyValidato
      * policy defined by the AssertionInfo parameter
      */
     public boolean canValidatePolicy(AssertionInfo assertionInfo) {
-        if (assertionInfo.getAssertion() != null 
+        return assertionInfo.getAssertion() != null 
             && (SP12Constants.KERBEROS_TOKEN.equals(assertionInfo.getAssertion().getName())
-                || SP11Constants.KERBEROS_TOKEN.equals(assertionInfo.getAssertion().getName()))) {
-            return true;
-        }
-        
-        return false;
+                || SP11Constants.KERBEROS_TOKEN.equals(assertionInfo.getAssertion().getName()));
     }
     
     /**

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/LayoutPolicyValidator.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/LayoutPolicyValidator.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/LayoutPolicyValidator.java
index b74025a..c2a3ab9 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/LayoutPolicyValidator.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/LayoutPolicyValidator.java
@@ -57,13 +57,9 @@ public class LayoutPolicyValidator extends AbstractSecurityPolicyValidator {
      * policy defined by the AssertionInfo parameter
      */
     public boolean canValidatePolicy(AssertionInfo assertionInfo) {
-        if (assertionInfo.getAssertion() != null 
+        return assertionInfo.getAssertion() != null 
             && (SP12Constants.LAYOUT.equals(assertionInfo.getAssertion().getName())
-                || SP11Constants.LAYOUT.equals(assertionInfo.getAssertion().getName()))) {
-            return true;
-        }
-        
-        return false;
+                || SP11Constants.LAYOUT.equals(assertionInfo.getAssertion().getName()));
     }
     
     /**

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SamlTokenPolicyValidator.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SamlTokenPolicyValidator.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SamlTokenPolicyValidator.java
index 27f61c8..46cfb1c 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SamlTokenPolicyValidator.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SamlTokenPolicyValidator.java
@@ -48,13 +48,9 @@ public class SamlTokenPolicyValidator extends AbstractSamlPolicyValidator {
      * policy defined by the AssertionInfo parameter
      */
     public boolean canValidatePolicy(AssertionInfo assertionInfo) {
-        if (assertionInfo.getAssertion() != null 
+        return assertionInfo.getAssertion() != null 
             && (SP12Constants.SAML_TOKEN.equals(assertionInfo.getAssertion().getName())
-                || SP11Constants.SAML_TOKEN.equals(assertionInfo.getAssertion().getName()))) {
-            return true;
-        }
-        
-        return false;
+                || SP11Constants.SAML_TOKEN.equals(assertionInfo.getAssertion().getName()));
     }
     
     /**

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SecurityContextTokenPolicyValidator.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SecurityContextTokenPolicyValidator.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SecurityContextTokenPolicyValidator.java
index 9c6444e..6cbbd14 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SecurityContextTokenPolicyValidator.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SecurityContextTokenPolicyValidator.java
@@ -41,13 +41,9 @@ public class SecurityContextTokenPolicyValidator extends AbstractSecurityPolicyV
      * policy defined by the AssertionInfo parameter
      */
     public boolean canValidatePolicy(AssertionInfo assertionInfo) {
-        if (assertionInfo.getAssertion() != null 
+        return assertionInfo.getAssertion() != null 
             && (SP12Constants.SECURITY_CONTEXT_TOKEN.equals(assertionInfo.getAssertion().getName())
-                || SP11Constants.SECURITY_CONTEXT_TOKEN.equals(assertionInfo.getAssertion().getName()))) {
-            return true;
-        }
-        
-        return false;
+                || SP11Constants.SECURITY_CONTEXT_TOKEN.equals(assertionInfo.getAssertion().getName()));
     }
     
     /**

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SignedEncryptedTokenPolicyValidator.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SignedEncryptedTokenPolicyValidator.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SignedEncryptedTokenPolicyValidator.java
index 1126c20..e8d58c7 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SignedEncryptedTokenPolicyValidator.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SignedEncryptedTokenPolicyValidator.java
@@ -45,12 +45,8 @@ public class SignedEncryptedTokenPolicyValidator extends AbstractSupportingToken
      * policy defined by the AssertionInfo parameter
      */
     public boolean canValidatePolicy(AssertionInfo assertionInfo) {
-        if (assertionInfo.getAssertion() != null 
-            && SP12Constants.SIGNED_ENCRYPTED_SUPPORTING_TOKENS.equals(assertionInfo.getAssertion().getName())) {
-            return true;
-        }
-        
-        return false;
+        return assertionInfo.getAssertion() != null 
+            && SP12Constants.SIGNED_ENCRYPTED_SUPPORTING_TOKENS.equals(assertionInfo.getAssertion().getName());
     }
     
     /**

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SignedEndorsingEncryptedTokenPolicyValidator.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SignedEndorsingEncryptedTokenPolicyValidator.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SignedEndorsingEncryptedTokenPolicyValidator.java
index f7bb086..b71d14e 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SignedEndorsingEncryptedTokenPolicyValidator.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SignedEndorsingEncryptedTokenPolicyValidator.java
@@ -49,12 +49,8 @@ public class SignedEndorsingEncryptedTokenPolicyValidator extends AbstractSuppor
      */
     public boolean canValidatePolicy(AssertionInfo assertionInfo) {
         QName suppTokens12 = SP12Constants.SIGNED_ENDORSING_ENCRYPTED_SUPPORTING_TOKENS;
-        if (assertionInfo.getAssertion() != null 
-            && suppTokens12.equals(assertionInfo.getAssertion().getName())) {
-            return true;
-        }
-        
-        return false;
+        return assertionInfo.getAssertion() != null 
+            && suppTokens12.equals(assertionInfo.getAssertion().getName());
     }
     
     /**

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SignedEndorsingTokenPolicyValidator.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SignedEndorsingTokenPolicyValidator.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SignedEndorsingTokenPolicyValidator.java
index a207715..77e7ebd 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SignedEndorsingTokenPolicyValidator.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SignedEndorsingTokenPolicyValidator.java
@@ -47,13 +47,9 @@ public class SignedEndorsingTokenPolicyValidator extends AbstractSupportingToken
      * policy defined by the AssertionInfo parameter
      */
     public boolean canValidatePolicy(AssertionInfo assertionInfo) {
-        if (assertionInfo.getAssertion() != null 
+        return assertionInfo.getAssertion() != null 
             && (SP12Constants.SIGNED_ENDORSING_SUPPORTING_TOKENS.equals(assertionInfo.getAssertion().getName())
-                || SP11Constants.SIGNED_ENDORSING_SUPPORTING_TOKENS.equals(assertionInfo.getAssertion().getName()))) {
-            return true;
-        }
-        
-        return false;
+                || SP11Constants.SIGNED_ENDORSING_SUPPORTING_TOKENS.equals(assertionInfo.getAssertion().getName()));
     }
     
     /**

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SignedTokenPolicyValidator.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SignedTokenPolicyValidator.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SignedTokenPolicyValidator.java
index ea80db1..c04f4b6 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SignedTokenPolicyValidator.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SignedTokenPolicyValidator.java
@@ -45,13 +45,9 @@ public class SignedTokenPolicyValidator extends AbstractSupportingTokenPolicyVal
      * policy defined by the AssertionInfo parameter
      */
     public boolean canValidatePolicy(AssertionInfo assertionInfo) {
-        if (assertionInfo.getAssertion() != null 
+        return assertionInfo.getAssertion() != null 
             && (SP12Constants.SIGNED_SUPPORTING_TOKENS.equals(assertionInfo.getAssertion().getName())
-                || SP11Constants.SIGNED_SUPPORTING_TOKENS.equals(assertionInfo.getAssertion().getName()))) {
-            return true;
-        }
-        
-        return false;
+                || SP11Constants.SIGNED_SUPPORTING_TOKENS.equals(assertionInfo.getAssertion().getName()));
     }
     
     /**

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SymmetricBindingPolicyValidator.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SymmetricBindingPolicyValidator.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SymmetricBindingPolicyValidator.java
index 08b1699..f724f5e 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SymmetricBindingPolicyValidator.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SymmetricBindingPolicyValidator.java
@@ -46,13 +46,9 @@ public class SymmetricBindingPolicyValidator extends AbstractBindingPolicyValida
      * policy defined by the AssertionInfo parameter
      */
     public boolean canValidatePolicy(AssertionInfo assertionInfo) {
-        if (assertionInfo.getAssertion() != null 
+        return assertionInfo.getAssertion() != null 
             && (SP12Constants.SYMMETRIC_BINDING.equals(assertionInfo.getAssertion().getName())
-                || SP11Constants.SYMMETRIC_BINDING.equals(assertionInfo.getAssertion().getName()))) {
-            return true;
-        }
-        
-        return false;
+                || SP11Constants.SYMMETRIC_BINDING.equals(assertionInfo.getAssertion().getName()));
     }
     
     /**

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/TransportBindingPolicyValidator.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/TransportBindingPolicyValidator.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/TransportBindingPolicyValidator.java
index 869804d..2e049f3 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/TransportBindingPolicyValidator.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/TransportBindingPolicyValidator.java
@@ -42,13 +42,9 @@ public class TransportBindingPolicyValidator extends AbstractBindingPolicyValida
      * policy defined by the AssertionInfo parameter
      */
     public boolean canValidatePolicy(AssertionInfo assertionInfo) {
-        if (assertionInfo.getAssertion() != null 
+        return assertionInfo.getAssertion() != null 
             && (SP12Constants.TRANSPORT_BINDING.equals(assertionInfo.getAssertion().getName())
-                || SP11Constants.TRANSPORT_BINDING.equals(assertionInfo.getAssertion().getName()))) {
-            return true;
-        }
-        
-        return false;
+                || SP11Constants.TRANSPORT_BINDING.equals(assertionInfo.getAssertion().getName()));
     }
     
     /**

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/UsernameTokenPolicyValidator.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/UsernameTokenPolicyValidator.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/UsernameTokenPolicyValidator.java
index 2e06b02..37ceeaa 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/UsernameTokenPolicyValidator.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/UsernameTokenPolicyValidator.java
@@ -48,13 +48,9 @@ public class UsernameTokenPolicyValidator extends AbstractSecurityPolicyValidato
      * policy defined by the AssertionInfo parameter
      */
     public boolean canValidatePolicy(AssertionInfo assertionInfo) {
-        if (assertionInfo.getAssertion() != null 
+        return assertionInfo.getAssertion() != null 
             && (SP12Constants.USERNAME_TOKEN.equals(assertionInfo.getAssertion().getName())
-                || SP11Constants.USERNAME_TOKEN.equals(assertionInfo.getAssertion().getName()))) {
-            return true;
-        }
-        
-        return false;
+                || SP11Constants.USERNAME_TOKEN.equals(assertionInfo.getAssertion().getName()));
     }
     
     /**

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/WSS11PolicyValidator.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/WSS11PolicyValidator.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/WSS11PolicyValidator.java
index 14e4180..4c86c82 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/WSS11PolicyValidator.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/WSS11PolicyValidator.java
@@ -45,13 +45,9 @@ public class WSS11PolicyValidator extends AbstractSecurityPolicyValidator {
      * policy defined by the AssertionInfo parameter
      */
     public boolean canValidatePolicy(AssertionInfo assertionInfo) {
-        if (assertionInfo.getAssertion() != null 
+        return assertionInfo.getAssertion() != null 
             && (SP12Constants.WSS11.equals(assertionInfo.getAssertion().getName())
-                || SP11Constants.WSS11.equals(assertionInfo.getAssertion().getName()))) {
-            return true;
-        }
-        
-        return false;
+                || SP11Constants.WSS11.equals(assertionInfo.getAssertion().getName()));
     }
     
     /**

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/X509TokenPolicyValidator.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/X509TokenPolicyValidator.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/X509TokenPolicyValidator.java
index 20ffd2a..8a3feb2 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/X509TokenPolicyValidator.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/X509TokenPolicyValidator.java
@@ -62,13 +62,9 @@ public class X509TokenPolicyValidator extends AbstractSecurityPolicyValidator {
      * policy defined by the AssertionInfo parameter
      */
     public boolean canValidatePolicy(AssertionInfo assertionInfo) {
-        if (assertionInfo.getAssertion() != null 
+        return assertionInfo.getAssertion() != null 
             && (SP12Constants.X509_TOKEN.equals(assertionInfo.getAssertion().getName())
-                || SP11Constants.X509_TOKEN.equals(assertionInfo.getAssertion().getName()))) {
-            return true;
-        }
-        
-        return false;
+                || SP11Constants.X509_TOKEN.equals(assertionInfo.getAssertion().getName()));
     }
     
     /**

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/PartialWSDLProcessor.java
----------------------------------------------------------------------
diff --git a/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/PartialWSDLProcessor.java b/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/PartialWSDLProcessor.java
index 6dd5c03..389dbcd 100644
--- a/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/PartialWSDLProcessor.java
+++ b/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/PartialWSDLProcessor.java
@@ -60,7 +60,7 @@ public final class PartialWSDLProcessor  {
     }
 
     
-    public static  boolean isPortTypeExisted(Definition wsdlDefinition, QName name) {
+    public static boolean isPortTypeExisted(Definition wsdlDefinition, QName name) {
         Map<QName, PortType>  portTypes = CastUtils.cast(wsdlDefinition.getAllPortTypes());
         if (portTypes == null || portTypes.isEmpty()) {
             return false;
@@ -78,10 +78,7 @@ public final class PartialWSDLProcessor  {
         } catch (Exception e) {
             portType = null;
         }
-        if (portType == null) {
-            return false;
-        }    
-        return true;
+        return portType != null;
     }
 
     public static boolean isBindingExisted(Definition wsdlDefinition, QName name) {
@@ -100,22 +97,12 @@ public final class PartialWSDLProcessor  {
         } catch (Exception e) {
             binding = null;
         }
-        if (binding == null) {
-            return false;
-        }    
-        return true;
+        return binding != null;
     }
     public static boolean isServiceExisted(Definition wsdlDefinition, QName name) {
-        if (wsdlDefinition.getService(name) == null) {
-            return false;
-        }
-        return true;
+        return wsdlDefinition.getService(name) != null;
     }
 
-
-
-
-
     public static Binding doAppendBinding(Definition wsdlDefinition, String name, PortType portType, 
                                              ExtensionRegistry extReg) throws Exception {
         Binding binding = wsdlDefinition.createBinding();

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java
----------------------------------------------------------------------
diff --git a/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java b/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java
index 0fff006..4f9f481 100644
--- a/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java
+++ b/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java
@@ -784,10 +784,7 @@ public class WSDLServiceBuilder {
     private static boolean hasAttributes(XmlSchemaComplexType complexType) {
         // Now lets see if we have any attributes...
         // This should probably look at the restricted and substitute types too.
-        if (complexType.getAnyAttribute() != null || !complexType.getAttributes().isEmpty()) {
-            return true;
-        }
-        return false;
+        return complexType.getAnyAttribute() != null || !complexType.getAttributes().isEmpty();
     }
 
     private static boolean isWrappableSequence(XmlSchemaComplexType type, String namespaceURI,

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/SAMLTokenProvider.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/SAMLTokenProvider.java b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/SAMLTokenProvider.java
index bad2009..4a16a75 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/SAMLTokenProvider.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/SAMLTokenProvider.java
@@ -83,11 +83,8 @@ public class SAMLTokenProvider extends AbstractSAMLTokenProvider implements Toke
         if (realm != null && !realmMap.containsKey(realm)) {
             return false;
         }
-        if (WSConstants.WSS_SAML2_TOKEN_TYPE.equals(tokenType) || WSConstants.SAML2_NS.equals(tokenType)
-            || WSConstants.WSS_SAML_TOKEN_TYPE.equals(tokenType) || WSConstants.SAML_NS.equals(tokenType)) {
-            return true;
-        }
-        return false;
+        return WSConstants.WSS_SAML2_TOKEN_TYPE.equals(tokenType) || WSConstants.SAML2_NS.equals(tokenType)
+            || WSConstants.WSS_SAML_TOKEN_TYPE.equals(tokenType) || WSConstants.SAML_NS.equals(tokenType);
     }
     
     /**

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/SCTProvider.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/SCTProvider.java b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/SCTProvider.java
index 1024c17..0d80a63 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/SCTProvider.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/SCTProvider.java
@@ -78,11 +78,8 @@ public class SCTProvider implements TokenProvider {
      * token provider.
      */
     public boolean canHandleToken(String tokenType, String realm) {
-        if (STSUtils.TOKEN_TYPE_SCT_05_02.equals(tokenType) 
-            || STSUtils.TOKEN_TYPE_SCT_05_12.equals(tokenType)) {
-            return true;
-        }
-        return false;
+        return STSUtils.TOKEN_TYPE_SCT_05_02.equals(tokenType) 
+            || STSUtils.TOKEN_TYPE_SCT_05_12.equals(tokenType);
     }
         
     /**

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/UsernameTokenValidator.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/UsernameTokenValidator.java b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/UsernameTokenValidator.java
index 7b51669..04fc346 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/UsernameTokenValidator.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/UsernameTokenValidator.java
@@ -102,10 +102,7 @@ public class UsernameTokenValidator implements TokenValidator {
      * ReceivedToken argument. The realm is ignored in this token Validator.
      */
     public boolean canHandleToken(ReceivedToken validateTarget, String realm) {
-        if (validateTarget.getToken() instanceof UsernameTokenType) {
-            return true;
-        }
-        return false;
+        return validateTarget.getToken() instanceof UsernameTokenType;
     }
     
     /**

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/DummyTokenProvider.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/DummyTokenProvider.java b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/DummyTokenProvider.java
index 14b98e8..87b7ea3 100644
--- a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/DummyTokenProvider.java
+++ b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/DummyTokenProvider.java
@@ -39,10 +39,7 @@ public class DummyTokenProvider implements TokenProvider {
         WSConstants.SOAPMESSAGE_NS + "#Base64Binary";
     
     public boolean canHandleToken(String tokenType) {
-        if (TOKEN_TYPE.equals(tokenType)) {
-            return true;
-        }
-        return false;
+        return TOKEN_TYPE.equals(tokenType);
     }
     
     public boolean canHandleToken(String tokenType, String realm) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/DummyTokenValidator.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/DummyTokenValidator.java b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/DummyTokenValidator.java
index 78dd303..13f4424 100644
--- a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/DummyTokenValidator.java
+++ b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/DummyTokenValidator.java
@@ -37,11 +37,8 @@ public class DummyTokenValidator implements TokenValidator {
     
     public boolean canHandleToken(ReceivedToken validateTarget) {
         Object token = validateTarget.getToken();
-        if ((token instanceof BinarySecurityTokenType)
-            && TOKEN_TYPE.equals(((BinarySecurityTokenType)token).getValueType())) {
-            return true;
-        }
-        return false;
+        return (token instanceof BinarySecurityTokenType)
+            && TOKEN_TYPE.equals(((BinarySecurityTokenType)token).getValueType());
     }
     
     public boolean canHandleToken(ReceivedToken validateTarget, String realm) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/deployment/CustomBSTTokenProvider.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/deployment/CustomBSTTokenProvider.java b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/deployment/CustomBSTTokenProvider.java
index ab1f39a..4d5dfd2 100644
--- a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/deployment/CustomBSTTokenProvider.java
+++ b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/deployment/CustomBSTTokenProvider.java
@@ -40,10 +40,7 @@ public class CustomBSTTokenProvider implements TokenProvider {
         WSConstants.SOAPMESSAGE_NS + "#Base64Binary";
     
     public boolean canHandleToken(String tokenType) {
-        if (TOKEN_TYPE.equals(tokenType)) {
-            return true;
-        }
-        return false;
+        return TOKEN_TYPE.equals(tokenType);
     }
     
     public boolean canHandleToken(String tokenType, String realm) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/deployment/CustomBSTTokenValidator.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/deployment/CustomBSTTokenValidator.java b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/deployment/CustomBSTTokenValidator.java
index 6879ec2..67f5b57 100644
--- a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/deployment/CustomBSTTokenValidator.java
+++ b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/deployment/CustomBSTTokenValidator.java
@@ -39,11 +39,8 @@ public class CustomBSTTokenValidator implements TokenValidator {
     
     public boolean canHandleToken(ReceivedToken validateTarget) {
         Object token = validateTarget.getToken();
-        if ((token instanceof BinarySecurityTokenType)
-            && TOKEN_TYPE.equals(((BinarySecurityTokenType)token).getValueType())) {
-            return true;
-        }
-        return false;
+        return (token instanceof BinarySecurityTokenType)
+            && TOKEN_TYPE.equals(((BinarySecurityTokenType)token).getValueType());
     }
     
     public boolean canHandleToken(ReceivedToken validateTarget, String realm) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/distributed_caching/CustomUsernameTokenProvider.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/distributed_caching/CustomUsernameTokenProvider.java b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/distributed_caching/CustomUsernameTokenProvider.java
index 1023c1f..b03bd95 100644
--- a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/distributed_caching/CustomUsernameTokenProvider.java
+++ b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/distributed_caching/CustomUsernameTokenProvider.java
@@ -39,10 +39,7 @@ public class CustomUsernameTokenProvider implements TokenProvider {
         "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#UsernameToken";
     
     public boolean canHandleToken(String tokenType) {
-        if (TOKEN_TYPE.equals(tokenType)) {
-            return true;
-        }
-        return false;
+        return TOKEN_TYPE.equals(tokenType);
     }
     
     public boolean canHandleToken(String tokenType, String realm) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SCTSAMLTokenProvider.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SCTSAMLTokenProvider.java b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SCTSAMLTokenProvider.java
index 4087ca1..81f257e 100644
--- a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SCTSAMLTokenProvider.java
+++ b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SCTSAMLTokenProvider.java
@@ -75,11 +75,8 @@ public class SCTSAMLTokenProvider implements TokenProvider {
      * that corresponds to the given TokenType.
      */
     public boolean canHandleToken(String tokenType) {
-        if (WSConstants.WSS_SAML2_TOKEN_TYPE.equals(tokenType) || WSConstants.SAML2_NS.equals(tokenType)
-            || WSConstants.WSS_SAML_TOKEN_TYPE.equals(tokenType) || WSConstants.SAML_NS.equals(tokenType)) {
-            return true;
-        }
-        return false;
+        return WSConstants.WSS_SAML2_TOKEN_TYPE.equals(tokenType) || WSConstants.SAML2_NS.equals(tokenType)
+            || WSConstants.WSS_SAML_TOKEN_TYPE.equals(tokenType) || WSConstants.SAML_NS.equals(tokenType);
     }
 
     public boolean canHandleToken(String tokenType, String realm) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameTokenValidator.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameTokenValidator.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameTokenValidator.java
index dfad100..ecd662f 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameTokenValidator.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameTokenValidator.java
@@ -41,10 +41,7 @@ public class UsernameTokenValidator implements TokenValidator {
      * ReceivedToken argument. The realm is ignored in this token Validator.
      */
     public boolean canHandleToken(ReceivedToken validateTarget, String realm) {
-        if (validateTarget.getToken() instanceof UsernameTokenType) {
-            return true;
-        }
-        return false;
+        return validateTarget.getToken() instanceof UsernameTokenType;
     }
     
     /**

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/services/ws-discovery/ws-discovery-api/src/main/java/org/apache/cxf/ws/discovery/internal/WSDiscoveryServiceImpl.java
----------------------------------------------------------------------
diff --git a/services/ws-discovery/ws-discovery-api/src/main/java/org/apache/cxf/ws/discovery/internal/WSDiscoveryServiceImpl.java b/services/ws-discovery/ws-discovery-api/src/main/java/org/apache/cxf/ws/discovery/internal/WSDiscoveryServiceImpl.java
index de8a0e6..713034b 100644
--- a/services/ws-discovery/ws-discovery-api/src/main/java/org/apache/cxf/ws/discovery/internal/WSDiscoveryServiceImpl.java
+++ b/services/ws-discovery/ws-discovery-api/src/main/java/org/apache/cxf/ws/discovery/internal/WSDiscoveryServiceImpl.java
@@ -594,10 +594,7 @@ public class WSDiscoveryServiceImpl implements WSDiscoveryService {
                 return false;
             }
             if (addr.equals(addc)) {
-                if (snr != null && !snr.equals(snc)) {
-                    return false;
-                }
-                return true;
+                return !(snr != null && !snr.equals(snc));
             }
             return false;
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/AllowAllHostnameVerifier.java
----------------------------------------------------------------------
diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/AllowAllHostnameVerifier.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/AllowAllHostnameVerifier.java
index f440240..b62c950 100644
--- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/AllowAllHostnameVerifier.java
+++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/AllowAllHostnameVerifier.java
@@ -34,10 +34,7 @@ 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;
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java
----------------------------------------------------------------------
diff --git a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java b/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java
index be285e4..6c1aa2b 100644
--- a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java
+++ b/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java
@@ -60,12 +60,9 @@ public abstract class AbstractTypeTestClient
     }
 
     public boolean shouldRunTest(String name) {
-        if (System.getProperty("java.vendor").contains("IBM")
-            && "GMonth".equals(name)) {
-            //the validator in ibm doesn't like this type.
-            return false;
-        }
-        return true;
+        //the validator in ibm doesn't like this type.
+        return !(System.getProperty("java.vendor").contains("IBM")
+            && "GMonth".equals(name));
     }
     
     public static void initClient(Class<?> clz, QName serviceName, 

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient3.java
----------------------------------------------------------------------
diff --git a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient3.java b/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient3.java
index e66865e..a55f6b4 100644
--- a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient3.java
+++ b/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient3.java
@@ -1580,12 +1580,9 @@ public abstract class AbstractTypeTestClient3 extends AbstractTypeTestClient2 {
     protected boolean equals(ChoiceWithGroups x, ChoiceWithGroups y) {
         if (x.getVarInt() != null && x.getVarString() != null
             && x.getVarFloat() != null) {
-            if (x.getVarInt().compareTo(y.getVarInt()) == 0 
+            return x.getVarInt().compareTo(y.getVarInt()) == 0 
                 && x.getVarString().equals(y.getVarString())
-                && x.getVarFloat().compareTo(y.getVarFloat()) == 0) {
-                return true;
-            }
-            return false;
+                && x.getVarFloat().compareTo(y.getVarFloat()) == 0;
         } else {
             if (x.getVarOtherFloat() != null && y.getVarOtherFloat() != null) {
                 return x.getVarOtherFloat().compareTo(y.getVarOtherFloat()) == 0;
@@ -2193,10 +2190,7 @@ public abstract class AbstractTypeTestClient3 extends AbstractTypeTestClient2 {
         if (x.getVarString() != null && !x.getVarString().equals(y.getVarString())) {
             return false;
         }
-        if (x.getVarInt() != null && x.getVarInt() != y.getVarInt()) {
-            return false;
-        }
-        return true;
+        return !(x.getVarInt() != null && x.getVarInt() != y.getVarInt());
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/util/MessageFlow.java
----------------------------------------------------------------------
diff --git a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/util/MessageFlow.java b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/util/MessageFlow.java
index 7d17d7b..03919a5 100644
--- a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/util/MessageFlow.java
+++ b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/util/MessageFlow.java
@@ -516,10 +516,7 @@ public class MessageFlow extends Assert {
                 break;
             }
         }
-        if (null != bodyElement && bodyElement.hasChildNodes()) {
-            return false;
-        }
-        return true;
+        return !(null != bodyElement && bodyElement.hasChildNodes());
     }
     
     private String dump(List<byte[]> streams) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssec11/WSSecurity11Common.java
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssec11/WSSecurity11Common.java b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssec11/WSSecurity11Common.java
index 27327e2..e565871 100644
--- a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssec11/WSSecurity11Common.java
+++ b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssec11/WSSecurity11Common.java
@@ -113,10 +113,6 @@ public class WSSecurity11Common extends AbstractBusClientServerTestBase {
         } else {
             javaVersionNum = new Double(javaVersion).doubleValue();
         }
-        if (javaVersionNum < 1.6) {
-            return false;
-        }
-        
-        return true;
+        return !(javaVersionNum < 1.6);
     }
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/util/MessageFlow.java
----------------------------------------------------------------------
diff --git a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/util/MessageFlow.java b/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/util/MessageFlow.java
index 7d17d7b..03919a5 100644
--- a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/util/MessageFlow.java
+++ b/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/util/MessageFlow.java
@@ -516,10 +516,7 @@ public class MessageFlow extends Assert {
                 break;
             }
         }
-        if (null != bodyElement && bodyElement.hasChildNodes()) {
-            return false;
-        }
-        return true;
+        return !(null != bodyElement && bodyElement.hasChildNodes());
     }
     
     private String dump(List<byte[]> streams) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/testutils/src/main/java/org/apache/cxf/testutil/common/AbstractBusClientServerTestBase.java
----------------------------------------------------------------------
diff --git a/testutils/src/main/java/org/apache/cxf/testutil/common/AbstractBusClientServerTestBase.java b/testutils/src/main/java/org/apache/cxf/testutil/common/AbstractBusClientServerTestBase.java
index fc1bfcf..17987fd 100644
--- a/testutils/src/main/java/org/apache/cxf/testutil/common/AbstractBusClientServerTestBase.java
+++ b/testutils/src/main/java/org/apache/cxf/testutil/common/AbstractBusClientServerTestBase.java
@@ -114,9 +114,6 @@ public abstract class AbstractBusClientServerTestBase extends AbstractClientServ
         tpe.execute(client);
         tpe.shutdown();
         tpe.awaitTermination(timeOut, timeUnit);
-        if (!client.isDone()) {
-            return false;
-        }
-        return true;
+        return client.isDone();
     }
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/tools/common/src/main/java/org/apache/cxf/tools/common/AbstractCXFToolContainer.java
----------------------------------------------------------------------
diff --git a/tools/common/src/main/java/org/apache/cxf/tools/common/AbstractCXFToolContainer.java b/tools/common/src/main/java/org/apache/cxf/tools/common/AbstractCXFToolContainer.java
index 905688c..96fc51c 100644
--- a/tools/common/src/main/java/org/apache/cxf/tools/common/AbstractCXFToolContainer.java
+++ b/tools/common/src/main/java/org/apache/cxf/tools/common/AbstractCXFToolContainer.java
@@ -62,10 +62,7 @@ public abstract class AbstractCXFToolContainer extends AbstractToolContainer {
         if (commandDocument == null) {
             return false;
         }
-        if ((commandDocument.hasParameter("help")) || (commandDocument.hasParameter("version"))) {
-            return true;
-        }
-        return false;
+        return commandDocument.hasParameter("help") || commandDocument.hasParameter("version");
     }
 
     public void execute(boolean exitOnFinish) throws ToolException {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/tools/common/src/main/java/org/apache/cxf/tools/common/ToolContext.java
----------------------------------------------------------------------
diff --git a/tools/common/src/main/java/org/apache/cxf/tools/common/ToolContext.java b/tools/common/src/main/java/org/apache/cxf/tools/common/ToolContext.java
index c3535dc..735b202 100644
--- a/tools/common/src/main/java/org/apache/cxf/tools/common/ToolContext.java
+++ b/tools/common/src/main/java/org/apache/cxf/tools/common/ToolContext.java
@@ -174,20 +174,14 @@ public class ToolContext {
         if (s instanceof String && ((String)s).length() > 0 && ((String)s).charAt(0) == '=') {
             s = ((String)s).substring(1);
         }
-        if (s == null || "none".equals(s) || "false".equals(s) || "basic".equals(s)) {
-            return false;
-        }
-        return true;
+        return !(s == null || "none".equals(s) || "false".equals(s) || "basic".equals(s));
     }
     public boolean basicValidateWSDL() {
         Object s = get(ToolConstants.CFG_VALIDATE_WSDL);
         if (s instanceof String && ((String)s).length() > 0 && ((String)s).charAt(0) == '=') {
             s = ((String)s).substring(1);
         }
-        if ("none".equals(s) || "false".equals(s)) {
-            return false;
-        }
-        return true;
+        return !("none".equals(s) || "false".equals(s));
     }
 
     public void addNamespacePackageMap(String namespace, String pn) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/AttributeVisitor.java
----------------------------------------------------------------------
diff --git a/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/AttributeVisitor.java b/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/AttributeVisitor.java
index d53ed6d..a7acbd2 100644
--- a/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/AttributeVisitor.java
+++ b/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/AttributeVisitor.java
@@ -85,11 +85,8 @@ public class AttributeVisitor extends VisitorBase {
     }
 
     public static boolean accept(AST node) {
-        if (node.getType() == IDLTokenTypes.LITERAL_readonly
-            || node.getType() == IDLTokenTypes.LITERAL_attribute) {
-            return true;
-        }
-        return false;
+        return node.getType() == IDLTokenTypes.LITERAL_readonly
+            || node.getType() == IDLTokenTypes.LITERAL_attribute;
     }
 
     public void visit(AST attributeNode) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/ConstVisitor.java
----------------------------------------------------------------------
diff --git a/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/ConstVisitor.java b/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/ConstVisitor.java
index c56e14e..ba542e1 100644
--- a/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/ConstVisitor.java
+++ b/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/ConstVisitor.java
@@ -39,10 +39,7 @@ public class ConstVisitor extends VisitorBase {
     }
     
     public static boolean accept(AST node) {
-        if (node.getType() == IDLTokenTypes.LITERAL_const) {
-            return true;
-        }
-        return false;
+        return node.getType() == IDLTokenTypes.LITERAL_const;
     }
     
     public void visit(AST constNode) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/EnumVisitor.java
----------------------------------------------------------------------
diff --git a/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/EnumVisitor.java b/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/EnumVisitor.java
index 20e8d80..792b9c1 100644
--- a/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/EnumVisitor.java
+++ b/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/EnumVisitor.java
@@ -42,10 +42,7 @@ public class EnumVisitor extends VisitorBase {
     }
 
     public static boolean accept(AST node) {
-        if (node.getType() == IDLTokenTypes.LITERAL_enum) {
-            return true;
-        }
-        return false;
+        return node.getType() == IDLTokenTypes.LITERAL_enum;
     }
 
     public void visit(AST enumNode) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/ExceptionVisitor.java
----------------------------------------------------------------------
diff --git a/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/ExceptionVisitor.java b/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/ExceptionVisitor.java
index 74c8b47..40b24b1 100644
--- a/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/ExceptionVisitor.java
+++ b/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/ExceptionVisitor.java
@@ -47,10 +47,7 @@ public class ExceptionVisitor extends VisitorBase {
     }
 
     public static boolean accept(AST node) {
-        if (node.getType() == IDLTokenTypes.LITERAL_exception) {
-            return true;
-        }
-        return false;
+        return node.getType() == IDLTokenTypes.LITERAL_exception;
     }
 
     public void visit(AST node) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/FixedPtConstVisitor.java
----------------------------------------------------------------------
diff --git a/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/FixedPtConstVisitor.java b/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/FixedPtConstVisitor.java
index f8904c2..767b91e 100644
--- a/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/FixedPtConstVisitor.java
+++ b/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/FixedPtConstVisitor.java
@@ -49,10 +49,7 @@ public class FixedPtConstVisitor implements Visitor {
 
     
     public static boolean accept(AST node) {
-        if (node.getType() == IDLTokenTypes.LITERAL_fixed) {
-            return true;
-        }
-        return false;
+        return node.getType() == IDLTokenTypes.LITERAL_fixed;
     }
     
     public void visit(AST fixedNode) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/FixedVisitor.java
----------------------------------------------------------------------
diff --git a/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/FixedVisitor.java b/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/FixedVisitor.java
index eb4f1a9..6b108cf 100644
--- a/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/FixedVisitor.java
+++ b/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/FixedVisitor.java
@@ -46,10 +46,7 @@ public class FixedVisitor extends VisitorBase {
     }
 
     public static boolean accept(AST node) {
-        if (node.getType() == IDLTokenTypes.LITERAL_fixed) {
-            return true;
-        }
-        return false;
+        return node.getType() == IDLTokenTypes.LITERAL_fixed;
     }
 
     public void visit(AST fixedNode) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/PortTypeVisitor.java
----------------------------------------------------------------------
diff --git a/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/PortTypeVisitor.java b/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/PortTypeVisitor.java
index d443847..c82aa25 100644
--- a/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/PortTypeVisitor.java
+++ b/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/PortTypeVisitor.java
@@ -60,10 +60,7 @@ public class PortTypeVisitor extends VisitorBase {
     }
 
     public static boolean accept(AST node) {
-        if (node.getType() == IDLTokenTypes.LITERAL_interface) {
-            return true;
-        }
-        return false;
+        return node.getType() == IDLTokenTypes.LITERAL_interface;
     }
     
     public void visit(AST node) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/ScopedNameVisitor.java
----------------------------------------------------------------------
diff --git a/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/ScopedNameVisitor.java b/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/ScopedNameVisitor.java
index 2d1fb67..a1a2585 100644
--- a/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/ScopedNameVisitor.java
+++ b/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/ScopedNameVisitor.java
@@ -562,13 +562,10 @@ public class ScopedNameVisitor extends VisitorBase {
     }     
     
     protected static boolean isFullyScopedName(AST node) {
-        if (node.getType() == IDLTokenTypes.IDENT
+        return node.getType() == IDLTokenTypes.IDENT
             && node.getFirstChild() != null
             && ((node.getFirstChild().getType() == IDLTokenTypes.SCOPEOP)
-                || (node.getFirstChild().getType() == IDLTokenTypes.IDENT))) {
-            return true;
-        }
-        return false;
+                || (node.getFirstChild().getType() == IDLTokenTypes.IDENT));
     }
     
     protected static Scope getFullyScopedName(Scope currentScope, AST node) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/SequenceVisitor.java
----------------------------------------------------------------------
diff --git a/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/SequenceVisitor.java b/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/SequenceVisitor.java
index 384583c..4666d31 100644
--- a/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/SequenceVisitor.java
+++ b/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/SequenceVisitor.java
@@ -51,10 +51,7 @@ public class SequenceVisitor extends VisitorBase {
     }
 
     public static boolean accept(AST node) {
-        if (node.getType() == IDLTokenTypes.LITERAL_sequence) {
-            return true;
-        }
-        return false;
+        return node.getType() == IDLTokenTypes.LITERAL_sequence;
     }
 
     public void visit(AST seq) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/StringVisitor.java
----------------------------------------------------------------------
diff --git a/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/StringVisitor.java b/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/StringVisitor.java
index 726f43e..1a06fa0 100644
--- a/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/StringVisitor.java
+++ b/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/StringVisitor.java
@@ -56,18 +56,12 @@ public class StringVisitor extends VisitorBase {
     }
 
     public static boolean accept(AST node) {
-        if ((node.getType() == IDLTokenTypes.LITERAL_string)
-            || (node.getType() == IDLTokenTypes.LITERAL_wstring)) {
-            return true;
-        }
-        return false;
+        return (node.getType() == IDLTokenTypes.LITERAL_string)
+            || (node.getType() == IDLTokenTypes.LITERAL_wstring);
     }
 
     public static boolean isBounded(AST node) {
-        if (node.getFirstChild() == null) {
-            return false;
-        }
-        return true;
+        return node.getFirstChild() != null;
     }
 
     public void visit(AST node) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/StructVisitor.java
----------------------------------------------------------------------
diff --git a/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/StructVisitor.java b/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/StructVisitor.java
index cb2d23f..aa26056 100644
--- a/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/StructVisitor.java
+++ b/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/StructVisitor.java
@@ -47,10 +47,7 @@ public class StructVisitor extends VisitorBase {
     }
 
     public static boolean accept(AST node) {
-        if (node.getType() == IDLTokenTypes.LITERAL_struct) {
-            return true;
-        }
-        return false;
+        return node.getType() == IDLTokenTypes.LITERAL_struct;
     }
 
     public void visit(AST node) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/TypedefVisitor.java
----------------------------------------------------------------------
diff --git a/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/TypedefVisitor.java b/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/TypedefVisitor.java
index 97bf6f5..b300f70 100644
--- a/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/TypedefVisitor.java
+++ b/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/TypedefVisitor.java
@@ -41,10 +41,7 @@ public class TypedefVisitor extends VisitorBase {
     }
     
     public static boolean accept(AST node) {
-        if (node.getType() == IDLTokenTypes.LITERAL_typedef) {
-            return true;
-        }
-        return false;
+        return node.getType() == IDLTokenTypes.LITERAL_typedef;
     }
     
     public void visit(AST typedefNode) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/UnionVisitor.java
----------------------------------------------------------------------
diff --git a/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/UnionVisitor.java b/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/UnionVisitor.java
index 1b06f0b..8f56ded 100644
--- a/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/UnionVisitor.java
+++ b/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/UnionVisitor.java
@@ -48,10 +48,7 @@ public class UnionVisitor extends VisitorBase {
     }
 
     public static boolean accept(AST node) {
-        if (node.getType() == IDLTokenTypes.LITERAL_union) {
-            return true;
-        }
-        return false;
+        return node.getType() == IDLTokenTypes.LITERAL_union;
     }
 
     public void visit(AST unionNode) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLParameter.java
----------------------------------------------------------------------
diff --git a/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLParameter.java b/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLParameter.java
index 6b93661..f55882f 100644
--- a/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLParameter.java
+++ b/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLParameter.java
@@ -614,10 +614,7 @@ public final class WSDLParameter {
     private boolean hasAttributes(XmlSchemaComplexType complexType) {
         // Now lets see if we have any attributes...
         // This should probably look at the restricted and substitute types too.
-        if (complexType.getAnyAttribute() != null || complexType.getAttributes().size() > 0) {
-            return true;
-        }
-        return false;
+        return complexType.getAnyAttribute() != null || complexType.getAttributes().size() > 0;
     }
 
     private boolean isWrappableSequence(XmlSchemaComplexType type) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToCorbaHelper.java
----------------------------------------------------------------------
diff --git a/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToCorbaHelper.java b/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToCorbaHelper.java
index ad5fdfb..9f2fed0 100644
--- a/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToCorbaHelper.java
+++ b/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToCorbaHelper.java
@@ -1594,11 +1594,7 @@ public class WSDLToCorbaHelper {
     }
 
     private boolean isIDLObjectType(QName typeName) {
-        if (typeName.equals(ReferenceConstants.WSADDRESSING_TYPE)) {
-            return true;
-        }
-
-        return false;
+        return typeName.equals(ReferenceConstants.WSADDRESSING_TYPE);
     }
 
     private boolean isAddressingNamespace(QName typeName) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/FrontendFactory.java
----------------------------------------------------------------------
diff --git a/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/FrontendFactory.java b/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/FrontendFactory.java
index eb2fde4..0814227 100644
--- a/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/FrontendFactory.java
+++ b/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/FrontendFactory.java
@@ -70,10 +70,7 @@ public final class FrontendFactory {
                 return true;
             }
         }
-        if (isJAXWSAnnotationExists()) {
-            return true;
-        }
-        return false;
+        return isJAXWSAnnotationExists();
     }
 
     private boolean isJAXWSAnnotationExists() {
@@ -108,10 +105,7 @@ public final class FrontendFactory {
 
     private boolean isExcluced(Method method) {
         WebMethod webMethod = AnnotationUtil.getPrivMethodAnnotation(method, WebMethod.class);
-        if (webMethod != null && webMethod.exclude()) {
-            return true;
-        }
-        return false;
+        return webMethod != null && webMethod.exclude();
     }
 
     public Style discoverStyle() {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/AntGenerator.java
----------------------------------------------------------------------
diff --git a/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/AntGenerator.java b/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/AntGenerator.java
index 80c2d89..f8d0094 100644
--- a/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/AntGenerator.java
+++ b/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/AntGenerator.java
@@ -41,10 +41,7 @@ public class AntGenerator extends AbstractGenerator {
     }
 
     public boolean passthrough() {
-        if (env.optionSet(ToolConstants.CFG_ANT)) {
-            return false;
-        }
-        return true;
+        return !env.optionSet(ToolConstants.CFG_ANT);
     }
 
     public void generate(ToolContext penv) throws ToolException {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JAXWSFrontEndProcessor.java
----------------------------------------------------------------------
diff --git a/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JAXWSFrontEndProcessor.java b/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JAXWSFrontEndProcessor.java
index 7027085..e4ab80a 100644
--- a/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JAXWSFrontEndProcessor.java
+++ b/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JAXWSFrontEndProcessor.java
@@ -182,10 +182,7 @@ public class JAXWSFrontEndProcessor implements Processor {
                 getInfClass(returnClass);
             }
         }
-        if (infList.contains("java.rmi.Remote")) {
-            return true;
-        }
-        return false;
+        return infList.contains("java.rmi.Remote");
     }
     
     

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/generator/JaxwsClientGenerator.java
----------------------------------------------------------------------
diff --git a/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/generator/JaxwsClientGenerator.java b/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/generator/JaxwsClientGenerator.java
index 590071d..8494c60 100644
--- a/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/generator/JaxwsClientGenerator.java
+++ b/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/generator/JaxwsClientGenerator.java
@@ -36,12 +36,9 @@ public class JaxwsClientGenerator extends AbstractJaxwsGenerator {
 
 
     public boolean passthrough() {
-        if (env.optionSet(ToolConstants.CFG_CLIENT)) {
-            return false;
-        }
-        return true;
+        return !env.optionSet(ToolConstants.CFG_CLIENT);
     }
-
+    
     public void generate(ToolContext penv) throws ToolException {
         this.env = penv;
         JavaModel javaModel = env.get(JavaModel.class);

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/generator/JaxwsImplGenerator.java
----------------------------------------------------------------------
diff --git a/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/generator/JaxwsImplGenerator.java b/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/generator/JaxwsImplGenerator.java
index 6f69f49..2f439a1 100644
--- a/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/generator/JaxwsImplGenerator.java
+++ b/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/generator/JaxwsImplGenerator.java
@@ -38,11 +38,8 @@ public class JaxwsImplGenerator extends AbstractJaxwsGenerator {
 
     public boolean passthrough() {
         Boolean genFromSei = (Boolean)env.get(ToolConstants.GEN_FROM_SEI);
-        if (genFromSei && env.optionSet(ToolConstants.CFG_SERVER)
-            && (!env.optionSet(ToolConstants.IMPL_CLASS))) {
-            return false;
-        }
-        return true;
+        return !(genFromSei && env.optionSet(ToolConstants.CFG_SERVER)
+            && (!env.optionSet(ToolConstants.IMPL_CLASS)));
     }
 
     public void generate(ToolContext penv) throws ToolException {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/generator/JaxwsSEIGenerator.java
----------------------------------------------------------------------
diff --git a/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/generator/JaxwsSEIGenerator.java b/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/generator/JaxwsSEIGenerator.java
index 3abf04f..e345119 100644
--- a/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/generator/JaxwsSEIGenerator.java
+++ b/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/generator/JaxwsSEIGenerator.java
@@ -37,11 +37,8 @@ public class JaxwsSEIGenerator extends AbstractJaxwsGenerator {
 
     public boolean passthrough() {
         Boolean genFromSei = (Boolean)env.get(ToolConstants.GEN_FROM_SEI);
-        if (!genFromSei && env.optionSet(ToolConstants.CFG_CLIENT)
-            && (!env.optionSet(ToolConstants.SEI_CLASS))) {
-            return false;
-        }
-        return true;
+        return !(!genFromSei && env.optionSet(ToolConstants.CFG_CLIENT)
+            && (!env.optionSet(ToolConstants.SEI_CLASS)));
 
     }
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/generator/JaxwsServerGenerator.java
----------------------------------------------------------------------
diff --git a/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/generator/JaxwsServerGenerator.java b/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/generator/JaxwsServerGenerator.java
index 1852099..9e92152 100644
--- a/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/generator/JaxwsServerGenerator.java
+++ b/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/generator/JaxwsServerGenerator.java
@@ -39,10 +39,7 @@ public class JaxwsServerGenerator extends AbstractJaxwsGenerator {
     }
 
     public boolean passthrough() {
-        if (env.optionSet(ToolConstants.CFG_SERVER)) {
-            return false;
-        }
-        return true;
+        return !env.optionSet(ToolConstants.CFG_SERVER);
     }
 
     public void generate(ToolContext penv) throws ToolException {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/simple/generator/SimpleClientGenerator.java
----------------------------------------------------------------------
diff --git a/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/simple/generator/SimpleClientGenerator.java b/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/simple/generator/SimpleClientGenerator.java
index 6f0ede3..e19db77 100644
--- a/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/simple/generator/SimpleClientGenerator.java
+++ b/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/simple/generator/SimpleClientGenerator.java
@@ -35,10 +35,7 @@ public class SimpleClientGenerator extends AbstractSimpleGenerator {
     }
 
     public boolean passthrough() {
-        if (env.optionSet(ToolConstants.CFG_CLIENT)) {
-            return false;
-        }
-        return true;
+        return !env.optionSet(ToolConstants.CFG_CLIENT);
     }
 
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/simple/generator/SimpleImplGenerator.java
----------------------------------------------------------------------
diff --git a/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/simple/generator/SimpleImplGenerator.java b/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/simple/generator/SimpleImplGenerator.java
index 71d6a20..8c92676 100644
--- a/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/simple/generator/SimpleImplGenerator.java
+++ b/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/simple/generator/SimpleImplGenerator.java
@@ -36,13 +36,8 @@ public class SimpleImplGenerator extends AbstractSimpleGenerator {
 
     public boolean passthrough() {
         Boolean genFromSei = (Boolean)env.get(ToolConstants.GEN_FROM_SEI);
-        if (genFromSei && env.optionSet(ToolConstants.CFG_SERVER) 
-            && (!env.optionSet(ToolConstants.IMPL_CLASS))) {
-            return false;
-        }
-
-        return true;
-
+        return !(genFromSei && env.optionSet(ToolConstants.CFG_SERVER) 
+            && (!env.optionSet(ToolConstants.IMPL_CLASS)));
     }
 
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/simple/generator/SimpleSEIGenerator.java
----------------------------------------------------------------------
diff --git a/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/simple/generator/SimpleSEIGenerator.java b/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/simple/generator/SimpleSEIGenerator.java
index 87c6601..a985355 100644
--- a/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/simple/generator/SimpleSEIGenerator.java
+++ b/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/simple/generator/SimpleSEIGenerator.java
@@ -36,12 +36,8 @@ public class SimpleSEIGenerator extends AbstractSimpleGenerator {
 
     public boolean passthrough() {
         Boolean genFromSei = (Boolean)env.get(ToolConstants.GEN_FROM_SEI);
-        if (!genFromSei && env.optionSet(ToolConstants.CFG_CLIENT)
-            && (!env.optionSet(ToolConstants.SEI_CLASS))) {
-            return false;
-        }
-        return true;
-
+        return !(!genFromSei && env.optionSet(ToolConstants.CFG_CLIENT)
+            && (!env.optionSet(ToolConstants.SEI_CLASS)));
     }
 
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/simple/generator/SimpleServerGenerator.java
----------------------------------------------------------------------
diff --git a/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/simple/generator/SimpleServerGenerator.java b/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/simple/generator/SimpleServerGenerator.java
index ad1783a..7ab74df 100644
--- a/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/simple/generator/SimpleServerGenerator.java
+++ b/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/simple/generator/SimpleServerGenerator.java
@@ -39,10 +39,7 @@ public class SimpleServerGenerator extends AbstractSimpleGenerator {
     }
 
     public boolean passthrough() {
-        if (env.optionSet(ToolConstants.CFG_SERVER)) {
-            return false;
-        }
-        return true;
+        return !env.optionSet(ToolConstants.CFG_SERVER);
     }
 
     public void generate(ToolContext penv) throws ToolException {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxb/CustomizationParser.java
----------------------------------------------------------------------
diff --git a/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxb/CustomizationParser.java b/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxb/CustomizationParser.java
index 1f2164e..22bd3e4 100644
--- a/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxb/CustomizationParser.java
+++ b/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxb/CustomizationParser.java
@@ -164,11 +164,7 @@ public final class CustomizationParser {
     }
     
     private boolean isValidJaxbBindingFile(XMLStreamReader reader) {
-        if (ToolConstants.JAXB_BINDINGS.equals(reader.getName())) {
-
-            return true;
-        }
-        return false;
+        return ToolConstants.JAXB_BINDINGS.equals(reader.getName());
     }
 
     private String[] getBindingFiles(ToolContext env) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java
----------------------------------------------------------------------
diff --git a/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java b/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java
index 3b57251..1ba192a 100644
--- a/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java
+++ b/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java
@@ -711,10 +711,7 @@ public class WSDLToJavaContainer extends AbstractCXFToolContainer {
             || context.optionSet(ToolConstants.CFG_GEN_FAULT)) {
             return true;
         }
-        if (context.optionSet(ToolConstants.CFG_NO_TYPES)) {
-            return true;
-        }
-        return false;
+        return context.optionSet(ToolConstants.CFG_NO_TYPES);
     }
 
     public void generateTypes() throws ToolException {


Mime
View raw message