cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [1/3] cxf git commit: The new PMD plugin is strict about simplifying boolean returns
Date Fri, 03 Apr 2015 16:02:56 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 4387055bb -> 3309231e4


http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/CustomizationParser.java
----------------------------------------------------------------------
diff --git a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/CustomizationParser.java
b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/CustomizationParser.java
index 7352010..fbac01b 100644
--- a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/CustomizationParser.java
+++ b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/CustomizationParser.java
@@ -598,26 +598,12 @@ public final class CustomizationParser {
     }
 
     private boolean isValidJaxbBindingFile(XMLStreamReader reader) {
-        if (ToolConstants.JAXB_BINDINGS.equals(reader.getName())
-            || ToolConstants.SCHEMA.equals(reader.getName())) {
-            return true;
-        }
-        return false;
+        return ToolConstants.JAXB_BINDINGS.equals(reader.getName())
+            || ToolConstants.SCHEMA.equals(reader.getName());
     }
 
     private boolean isValidJaxwsBindingFile(String bindingLocation, XMLStreamReader reader)
{
-        if (ToolConstants.JAXWS_BINDINGS.equals(reader.getName())) {
-            // Comment this check , by default wsdlLocation value will be the
-            // user input wsdl url
-            /*
-             * String wsdlLocation = reader.getAttributeValue(null,
-             * "wsdlLocation"); if (!StringUtils.isEmpty(wsdlLocation)) { return
-             * true; }
-             */
-            return true;
-        }
-        return false;
-
+        return ToolConstants.JAXWS_BINDINGS.equals(reader.getName());
     }
 
     protected void setWSDLNode(final Element node) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/JAXWSBindingParser.java
----------------------------------------------------------------------
diff --git a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/JAXWSBindingParser.java
b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/JAXWSBindingParser.java
index 02c895a..b0d3487 100644
--- a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/JAXWSBindingParser.java
+++ b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/JAXWSBindingParser.java
@@ -163,12 +163,8 @@ public class JAXWSBindingParser {
 
 
     private boolean isPackageElement(Node node) {
-        if (ToolConstants.NS_JAXWS_BINDINGS.equals(node.getNamespaceURI())
-            && "package".equals(node.getLocalName())) {
-            return true;
-        }
-        return false;
-
+        return ToolConstants.NS_JAXWS_BINDINGS.equals(node.getNamespaceURI())
+            && "package".equals(node.getLocalName());
     }
 
     private boolean isJAXWSParameterElement(Node node) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/AntGenerator.java
----------------------------------------------------------------------
diff --git a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/AntGenerator.java
b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/AntGenerator.java
index d5e3f25..9935306 100644
--- a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/AntGenerator.java
+++ b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/AntGenerator.java
@@ -46,12 +46,9 @@ public class AntGenerator extends AbstractJAXWSGenerator {
     }
 
     public boolean passthrough() {
-        if (env.optionSet(ToolConstants.CFG_ANT)
+        return !(env.optionSet(ToolConstants.CFG_ANT)
                 || env.optionSet(ToolConstants.CFG_ALL)
-                || env.optionSet(ToolConstants.CFG_GEN_ANT)) {
-            return false;
-        }
-        return true;
+                || env.optionSet(ToolConstants.CFG_GEN_ANT));
     }
 
     public void generate(ToolContext penv) throws ToolException {       

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ClientGenerator.java
----------------------------------------------------------------------
diff --git a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ClientGenerator.java
b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ClientGenerator.java
index d8b222f..f7fc307 100644
--- a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ClientGenerator.java
+++ b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ClientGenerator.java
@@ -46,19 +46,8 @@ public class ClientGenerator extends AbstractJAXWSGenerator {
     }
 
     public boolean passthrough() {
-        if (env.optionSet(ToolConstants.CFG_GEN_CLIENT) || env.optionSet(ToolConstants.CFG_CLIENT)
-            || env.optionSet(ToolConstants.CFG_ALL)) {
-            return false;
-        }
-        if (env.optionSet(ToolConstants.CFG_GEN_ANT) || env.optionSet(ToolConstants.CFG_GEN_TYPES)
-            || env.optionSet(ToolConstants.CFG_GEN_IMPL) || env.optionSet(ToolConstants.CFG_GEN_SEI)
-            || env.optionSet(ToolConstants.CFG_GEN_SERVER) || env.optionSet(ToolConstants.CFG_GEN_SERVICE)
-            || env.optionSet(ToolConstants.CFG_GEN_FAULT)) {
-            return true;
-        }
-
-        return true;
-
+        return !(env.optionSet(ToolConstants.CFG_GEN_CLIENT) || env.optionSet(ToolConstants.CFG_CLIENT)
+                || env.optionSet(ToolConstants.CFG_ALL));
     }
 
     public void generate(ToolContext penv) throws ToolException {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/FaultGenerator.java
----------------------------------------------------------------------
diff --git a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/FaultGenerator.java
b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/FaultGenerator.java
index b830ac4..35830ea 100644
--- a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/FaultGenerator.java
+++ b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/FaultGenerator.java
@@ -49,17 +49,13 @@ public class FaultGenerator extends AbstractJAXWSGenerator {
             || env.optionSet(ToolConstants.CFG_ALL)) {
             return false;
         } 
-        if (env.optionSet(ToolConstants.CFG_GEN_ANT)
+        return env.optionSet(ToolConstants.CFG_GEN_ANT)
             || env.optionSet(ToolConstants.CFG_GEN_TYPES)
             || env.optionSet(ToolConstants.CFG_GEN_CLIENT)
             || env.optionSet(ToolConstants.CFG_GEN_IMPL)
             || env.optionSet(ToolConstants.CFG_GEN_SEI)
             || env.optionSet(ToolConstants.CFG_GEN_SERVER)
-            || env.optionSet(ToolConstants.CFG_GEN_SERVICE)) {
-            return true;
-        }
-        
-        return false;
+            || env.optionSet(ToolConstants.CFG_GEN_SERVICE);
     }
 
     public void generate(ToolContext penv) throws ToolException {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ImplGenerator.java
----------------------------------------------------------------------
diff --git a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ImplGenerator.java
b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ImplGenerator.java
index a99a6ea..77137df 100644
--- a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ImplGenerator.java
+++ b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ImplGenerator.java
@@ -47,24 +47,9 @@ public class ImplGenerator extends AbstractJAXWSGenerator {
     }
 
     public boolean passthrough() {       
-        if (env.optionSet(ToolConstants.CFG_GEN_IMPL)
+        return !(env.optionSet(ToolConstants.CFG_GEN_IMPL)
             || env.optionSet(ToolConstants.CFG_IMPL)
-            || env.optionSet(ToolConstants.CFG_ALL)) {
-            return false;
-        } 
-        if (env.optionSet(ToolConstants.CFG_GEN_ANT)
-            || env.optionSet(ToolConstants.CFG_GEN_TYPES)
-            || env.optionSet(ToolConstants.CFG_GEN_CLIENT)
-            || env.optionSet(ToolConstants.CFG_GEN_SEI)
-            || env.optionSet(ToolConstants.CFG_GEN_SERVER)
-            || env.optionSet(ToolConstants.CFG_GEN_SERVICE)
-            || env.optionSet(ToolConstants.CFG_GEN_FAULT)) {
-            return true;
-        }
-        
-        return true;
-        
-        
+            || env.optionSet(ToolConstants.CFG_ALL));
     }
 
     public void generate(ToolContext penv) throws ToolException {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/SEIGenerator.java
----------------------------------------------------------------------
diff --git a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/SEIGenerator.java
b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/SEIGenerator.java
index 06675a5..87e7c97 100644
--- a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/SEIGenerator.java
+++ b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/SEIGenerator.java
@@ -51,15 +51,10 @@ public class SEIGenerator extends AbstractJAXWSGenerator {
         if (env.optionSet(ToolConstants.CFG_GEN_SEI) || env.optionSet(ToolConstants.CFG_ALL))
{
             return false;
         }
-        if (env.optionSet(ToolConstants.CFG_GEN_ANT) || env.optionSet(ToolConstants.CFG_GEN_TYPES)
+        return env.optionSet(ToolConstants.CFG_GEN_ANT) || env.optionSet(ToolConstants.CFG_GEN_TYPES)
             || env.optionSet(ToolConstants.CFG_GEN_CLIENT) || env.optionSet(ToolConstants.CFG_GEN_IMPL)
             || env.optionSet(ToolConstants.CFG_GEN_SERVER) || env.optionSet(ToolConstants.CFG_GEN_SERVICE)
-            || env.optionSet(ToolConstants.CFG_GEN_FAULT)) {
-            return true;
-        }
-
-        return false;
-
+            || env.optionSet(ToolConstants.CFG_GEN_FAULT);
     }
 
     private boolean hasHandlerConfig(JavaInterface intf) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ServerGenerator.java
----------------------------------------------------------------------
diff --git a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ServerGenerator.java
b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ServerGenerator.java
index 4311640..555efe4 100644
--- a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ServerGenerator.java
+++ b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ServerGenerator.java
@@ -48,17 +48,8 @@ public class ServerGenerator extends AbstractJAXWSGenerator {
     }
 
     public boolean passthrough() {
-        if (env.optionSet(ToolConstants.CFG_GEN_SERVER) || env.optionSet(ToolConstants.CFG_SERVER)
-            || env.optionSet(ToolConstants.CFG_ALL)) {
-            return false;
-        }
-        if (env.optionSet(ToolConstants.CFG_GEN_ANT) || env.optionSet(ToolConstants.CFG_GEN_TYPES)
-            || env.optionSet(ToolConstants.CFG_GEN_CLIENT) || env.optionSet(ToolConstants.CFG_GEN_IMPL)
-            || env.optionSet(ToolConstants.CFG_GEN_SEI) || env.optionSet(ToolConstants.CFG_GEN_SERVICE)
-            || env.optionSet(ToolConstants.CFG_GEN_FAULT)) {
-            return true;
-        }
-        return true;
+        return !(env.optionSet(ToolConstants.CFG_GEN_SERVER) || env.optionSet(ToolConstants.CFG_SERVER)
+            || env.optionSet(ToolConstants.CFG_ALL));
     }
 
     public void generate(ToolContext penv) throws ToolException {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ServiceGenerator.java
----------------------------------------------------------------------
diff --git a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ServiceGenerator.java
b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ServiceGenerator.java
index 22aefa4..1715d4c 100644
--- a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ServiceGenerator.java
+++ b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ServiceGenerator.java
@@ -51,16 +51,13 @@ public class ServiceGenerator extends AbstractJAXWSGenerator {
             || env.optionSet(ToolConstants.CFG_ALL)) {
             return false;
         } 
-        if (env.optionSet(ToolConstants.CFG_GEN_ANT)
+        return env.optionSet(ToolConstants.CFG_GEN_ANT)
             || env.optionSet(ToolConstants.CFG_GEN_TYPES)
             || env.optionSet(ToolConstants.CFG_GEN_CLIENT)
             || env.optionSet(ToolConstants.CFG_GEN_IMPL)
             || env.optionSet(ToolConstants.CFG_GEN_SEI)
             || env.optionSet(ToolConstants.CFG_GEN_SERVER)
-            || env.optionSet(ToolConstants.CFG_GEN_FAULT)) {
-            return true;
-        }
-        return false;
+            || env.optionSet(ToolConstants.CFG_GEN_FAULT);
     }
 
     public void generate(ToolContext penv) throws ToolException {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
----------------------------------------------------------------------
diff --git a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
index 4bf2145..2d28713 100644
--- a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
+++ b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
@@ -522,10 +522,7 @@ public class ParameterProcessor extends AbstractProcessor {
             return false;
         }
 
-        if (!in.getNamespaceURI().equals(out.getNamespaceURI())) {
-            return false;
-        }
-        return true;
+        return in.getNamespaceURI().equals(out.getNamespaceURI());
     }
 
     private JavaParameter getParameterFromQName(QName wrapperElement, QName item, JavaType.Style
style,

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ServiceProcessor.java
----------------------------------------------------------------------
diff --git a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ServiceProcessor.java
b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ServiceProcessor.java
index c941aba..e2b7e5b 100644
--- a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ServiceProcessor.java
+++ b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ServiceProcessor.java
@@ -537,11 +537,8 @@ public class ServiceProcessor extends AbstractProcessor {
 
     private boolean isOutOfBandHeader(BindingMessageInfo bmi, ExtensibilityElement ext) {
         SoapHeader soapHeader = SOAPBindingUtil.getSoapHeader(ext);
-        if (soapHeader.getMessage() != null
-            && !bmi.getMessageInfo().getName().equals(soapHeader.getMessage())) {
-            return true;
-        }
-        return false;
+        return soapHeader.getMessage() != null
+            && !bmi.getMessageInfo().getName().equals(soapHeader.getMessage());
     }
 
     private void processSoapHeader(JavaMethod jm, BindingOperationInfo operation, ExtensibilityElement
ext) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/BindingAnnotator.java
----------------------------------------------------------------------
diff --git a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/BindingAnnotator.java
b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/BindingAnnotator.java
index 7a48f29..36fc246 100644
--- a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/BindingAnnotator.java
+++ b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/BindingAnnotator.java
@@ -132,12 +132,9 @@ public final class BindingAnnotator implements Annotator {
             intf.setSOAPUse(SOAPBinding.Use.ENCODED);
         }
 
-        if (intf.getSOAPStyle() == SOAPBinding.Style.DOCUMENT
+        return !(intf.getSOAPStyle() == SOAPBinding.Style.DOCUMENT
             && intf.getSOAPUse() == SOAPBinding.Use.LITERAL
-            && intf.getSOAPParameterStyle() == SOAPBinding.ParameterStyle.WRAPPED)
{
-            return false;
-        }
-        return true;
+            && intf.getSOAPParameterStyle() == SOAPBinding.ParameterStyle.WRAPPED);
     }
 }
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/validator/WrapperStyleNameCollisionValidator.java
----------------------------------------------------------------------
diff --git a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/validator/WrapperStyleNameCollisionValidator.java
b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/validator/WrapperStyleNameCollisionValidator.java
index aaecf44..5d3b700 100644
--- a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/validator/WrapperStyleNameCollisionValidator.java
+++ b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/validator/WrapperStyleNameCollisionValidator.java
@@ -81,10 +81,7 @@ public class WrapperStyleNameCollisionValidator extends ServiceValidator
{
     }
     private boolean checkBare(ToolContext context, String opName) {
         String o[] = context.getArray(ToolConstants.CFG_BAREMETHODS);
-        if (checkArray(o, opName)) {
-            return true;
-        }
-        return false;
+        return checkArray(o, opName);
     }
     private boolean isValidOperation(OperationInfo operation) {
         ToolContext context = service.getProperty(ToolContext.class.getName(), ToolContext.class);

http://git-wip-us.apache.org/repos/asf/cxf/blob/3309231e/tools/wsdlto/misc/src/main/java/org/apache/cxf/tools/misc/processor/WSDLToSoapProcessor.java
----------------------------------------------------------------------
diff --git a/tools/wsdlto/misc/src/main/java/org/apache/cxf/tools/misc/processor/WSDLToSoapProcessor.java
b/tools/wsdlto/misc/src/main/java/org/apache/cxf/tools/misc/processor/WSDLToSoapProcessor.java
index f6b02ad..08458af 100644
--- a/tools/wsdlto/misc/src/main/java/org/apache/cxf/tools/misc/processor/WSDLToSoapProcessor.java
+++ b/tools/wsdlto/misc/src/main/java/org/apache/cxf/tools/misc/processor/WSDLToSoapProcessor.java
@@ -142,11 +142,8 @@ public class WSDLToSoapProcessor extends AbstractWSDLToProcessor {
     }
 
     private boolean nameSpaceCheck() {
-        if (WSDLConstants.RPC.equalsIgnoreCase((String)env.get(ToolConstants.CFG_STYLE))
-            && !env.optionSet(ToolConstants.CFG_NAMESPACE)) {
-            return false;
-        }
-        return true;
+        return !(WSDLConstants.RPC.equalsIgnoreCase((String)env.get(ToolConstants.CFG_STYLE))
+            && !env.optionSet(ToolConstants.CFG_NAMESPACE));
     }
 
     protected void init() throws ToolException {


Mime
View raw message