cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1405021 - in /cxf/trunk: maven-plugins/wadl2java-plugin/src/main/java/org/apache/cxf/maven_plugin/wadlto/ maven-plugins/wsdl-validator-plugin/src/main/java/org/apache/cxf/maven_plugin/ rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/...
Date Fri, 02 Nov 2012 16:02:35 GMT
Author: coheigea
Date: Fri Nov  2 16:02:35 2012
New Revision: 1405021

URL: http://svn.apache.org/viewvc?rev=1405021&view=rev
Log:
More minor cleanup stuff

Modified:
    cxf/trunk/maven-plugins/wadl2java-plugin/src/main/java/org/apache/cxf/maven_plugin/wadlto/OptionLoader.java
    cxf/trunk/maven-plugins/wsdl-validator-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDLValidatorMojo.java
    cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/WrapperHelperCompiler.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/WebServiceProviderConfiguration.java
    cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToCorbaHelper.java
    cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
    cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/WSDLToJavaProcessor.java
    cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java

Modified: cxf/trunk/maven-plugins/wadl2java-plugin/src/main/java/org/apache/cxf/maven_plugin/wadlto/OptionLoader.java
URL: http://svn.apache.org/viewvc/cxf/trunk/maven-plugins/wadl2java-plugin/src/main/java/org/apache/cxf/maven_plugin/wadlto/OptionLoader.java?rev=1405021&r1=1405020&r2=1405021&view=diff
==============================================================================
--- cxf/trunk/maven-plugins/wadl2java-plugin/src/main/java/org/apache/cxf/maven_plugin/wadlto/OptionLoader.java
(original)
+++ cxf/trunk/maven-plugins/wadl2java-plugin/src/main/java/org/apache/cxf/maven_plugin/wadlto/OptionLoader.java
Fri Nov  2 16:02:35 2012
@@ -114,13 +114,11 @@ public final class OptionLoader {
         }
         StringBuilder str = new StringBuilder();
 
-        if (arr != null) {
-            for (String s : arr) {
-                if (str.length() > 0) {
-                    str.append(',');
-                }
-                str.append(s);
+        for (String s : arr) {
+            if (str.length() > 0) {
+                str.append(',');
             }
+            str.append(s);
         }
         return str.toString();
     }

Modified: cxf/trunk/maven-plugins/wsdl-validator-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDLValidatorMojo.java
URL: http://svn.apache.org/viewvc/cxf/trunk/maven-plugins/wsdl-validator-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDLValidatorMojo.java?rev=1405021&r1=1405020&r2=1405021&view=diff
==============================================================================
--- cxf/trunk/maven-plugins/wsdl-validator-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDLValidatorMojo.java
(original)
+++ cxf/trunk/maven-plugins/wsdl-validator-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDLValidatorMojo.java
Fri Nov  2 16:02:35 2012
@@ -85,13 +85,11 @@ public class WSDLValidatorMojo extends A
         }
         StringBuilder str = new StringBuilder();
 
-        if (arr != null) {
-            for (String s : arr) {
-                if (str.length() > 0) {
-                    str.append(',');
-                }
-                str.append(s);
+        for (String s : arr) {
+            if (str.length() > 0) {
+                str.append(',');
             }
+            str.append(s);
         }
         return str.toString();
     }

Modified: cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/WrapperHelperCompiler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/WrapperHelperCompiler.java?rev=1405021&r1=1405020&r2=1405021&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/WrapperHelperCompiler.java
(original)
+++ cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/WrapperHelperCompiler.java
Fri Nov  2 16:02:35 2012
@@ -154,9 +154,6 @@ final class WrapperHelperCompiler extend
     
     private boolean addSignature() {
         String sig = computeSignature();
-        if (sig == null) {
-            return false;
-        }
         MethodVisitor mv = cw.visitMethod(Opcodes.ACC_PUBLIC,
                                           "getSignature", "()Ljava/lang/String;", null, null);
         mv.visitCode();

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java?rev=1405021&r1=1405020&r2=1405021&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java Fri
Nov  2 16:02:35 2012
@@ -790,7 +790,7 @@ public final class JAXRSUtils {
                 HttpServletRequest request = (HttpServletRequest)m.get(AbstractHTTPDestination.HTTP_REQUEST);
                 FormUtils.populateMapFromString(params, m, body, enc, decode, request);
             } else {
-                if (mt != null && "multipart".equalsIgnoreCase(mt.getType()) 
+                if ("multipart".equalsIgnoreCase(mt.getType()) 
                     && MediaType.MULTIPART_FORM_DATA_TYPE.isCompatible(mt)) {
                     MultipartBody body = AttachmentUtils.getMultipartBody(mc);
                     FormUtils.populateMapFromMultipart(params, body, m, decode);
@@ -798,7 +798,7 @@ public final class JAXRSUtils {
                     org.apache.cxf.common.i18n.Message errorMsg = 
                         new org.apache.cxf.common.i18n.Message("WRONG_FORM_MEDIA_TYPE", 
                                                                BUNDLE, 
-                                                               mt == null ? "*/*" : mt.toString());
+                                                               mt.toString());
                     LOG.warning(errorMsg.toString());
                     throw new WebApplicationException(415);
                 }

Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java?rev=1405021&r1=1405020&r2=1405021&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
(original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
Fri Nov  2 16:02:35 2012
@@ -101,11 +101,7 @@ public class JaxWsServiceConfiguration e
     @Override
     public String getServiceName() {
         QName service = implInfo.getServiceName();
-        if (service == null) {
-            return null;
-        } else {
-            return service.getLocalPart();
-        }
+        return service.getLocalPart();
     }
 
     @Override
@@ -115,11 +111,7 @@ public class JaxWsServiceConfiguration e
             return ret;
         }
         QName service = implInfo.getServiceName();
-        if (service == null) {
-            return null;
-        } else {
-            return service.getNamespaceURI();
-        }
+        return service.getNamespaceURI();
     }
 
     @Override

Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/WebServiceProviderConfiguration.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/WebServiceProviderConfiguration.java?rev=1405021&r1=1405020&r2=1405021&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/WebServiceProviderConfiguration.java
(original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/WebServiceProviderConfiguration.java
Fri Nov  2 16:02:35 2012
@@ -52,21 +52,13 @@ public class WebServiceProviderConfigura
     @Override
     public String getServiceName() {
         QName service = implInfo.getServiceName();
-        if (service == null) {
-            return null;
-        } else {
-            return service.getLocalPart();
-        }
+        return service.getLocalPart();
     }
 
     @Override
     public String getServiceNamespace() {
         QName service = implInfo.getServiceName();
-        if (service == null) {
-            return null;
-        } else {
-            return service.getNamespaceURI();
-        }
+        return service.getNamespaceURI();
     }
 
     @Override

Modified: cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToCorbaHelper.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToCorbaHelper.java?rev=1405021&r1=1405020&r2=1405021&view=diff
==============================================================================
--- cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToCorbaHelper.java
(original)
+++ cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToCorbaHelper.java
Fri Nov  2 16:02:35 2012
@@ -1168,21 +1168,17 @@ public class WSDLToCorbaHelper {
         CorbaTypeImpl seqtype =
             processSequenceType(seq, defaultName, schematypeName);
 
-        if  (seqtype != null) {
-            MemberType seqmem = new MemberType();
-            seqmem.setName(seqtype.getQName().getLocalPart() + "_f");
-            QName type = createQNameCorbaNamespace(seqtype.getQName().getLocalPart());
-            seqmem.setIdltype(type);
-            seqmem.setAnonschematype(true);
-            if (seqtype.isSetQualified() && seqtype.isQualified()) {
-                seqmem.setQualified(true);
-            }
-            corbaStruct.getMember().add(seqmem);
-            if (!isDuplicate(seqtype)) {
-                typeMappingType.getStructOrExceptionOrUnion().add(seqtype);
-            }
-        } else {
-            LOG.log(Level.WARNING, "Couldnt map Sequence inside extension");
+        MemberType seqmem = new MemberType();
+        seqmem.setName(seqtype.getQName().getLocalPart() + "_f");
+        QName type = createQNameCorbaNamespace(seqtype.getQName().getLocalPart());
+        seqmem.setIdltype(type);
+        seqmem.setAnonschematype(true);
+        if (seqtype.isSetQualified() && seqtype.isQualified()) {
+            seqmem.setQualified(true);
+        }
+        corbaStruct.getMember().add(seqmem);
+        if (!isDuplicate(seqtype)) {
+            typeMappingType.getStructOrExceptionOrUnion().add(seqtype);
         }
 
         return corbaStruct;
@@ -1193,20 +1189,16 @@ public class WSDLToCorbaHelper {
         throws Exception {
 
         CorbaTypeImpl alltype = processAllType(all, defaultName, schematypeName);
-        if (alltype != null) {
-            MemberType allmem = new MemberType();
-            allmem.setName(alltype.getQName().getLocalPart() + "_f");
-            allmem.setIdltype(alltype.getQName());
-            allmem.setAnonschematype(true);
-            if (alltype.isSetQualified() && alltype.isQualified()) {
-                allmem.setQualified(true);
-            }
-            corbaStruct.getMember().add(allmem);
-            if (!isDuplicate(alltype)) {
-                typeMappingType.getStructOrExceptionOrUnion().add(alltype);
-            }
-        } else {
-            LOG.log(Level.WARNING, "Couldnt map All inside extension");
+        MemberType allmem = new MemberType();
+        allmem.setName(alltype.getQName().getLocalPart() + "_f");
+        allmem.setIdltype(alltype.getQName());
+        allmem.setAnonschematype(true);
+        if (alltype.isSetQualified() && alltype.isQualified()) {
+            allmem.setQualified(true);
+        }
+        corbaStruct.getMember().add(allmem);
+        if (!isDuplicate(alltype)) {
+            typeMappingType.getStructOrExceptionOrUnion().add(alltype);
         }
 
         return corbaStruct;

Modified: cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java?rev=1405021&r1=1405020&r2=1405021&view=diff
==============================================================================
--- cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
(original)
+++ cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
Fri Nov  2 16:02:35 2012
@@ -806,27 +806,25 @@ public class JAXBDataBinding implements 
                                                                  (String)context.get(ToolConstants.CFG_ENCODING),
                                                                  context.get(OutputStreamCreator.class));
 
-            if (rawJaxbModelGenCode != null) {
-                S2JJAXBModel schem2JavaJaxbModel = rawJaxbModelGenCode;
+            S2JJAXBModel schem2JavaJaxbModel = rawJaxbModelGenCode;
 
-                ClassCollector classCollector = context.get(ClassCollector.class);
-                for (JClass cls : schem2JavaJaxbModel.getAllObjectFactories()) {
-                    classCollector.getTypesPackages().add(cls._package().name());
-                }
+            ClassCollector classCollector = context.get(ClassCollector.class);
+            for (JClass cls : schem2JavaJaxbModel.getAllObjectFactories()) {
+                classCollector.getTypesPackages().add(cls._package().name());
+            }
 
-                JCodeModel jcodeModel = schem2JavaJaxbModel.generateCode(null, null);
+            JCodeModel jcodeModel = schem2JavaJaxbModel.generateCode(null, null);
 
-                if (!isSuppressCodeGen()) {
-                    jcodeModel.build(fileCodeWriter);
-                }
+            if (!isSuppressCodeGen()) {
+                jcodeModel.build(fileCodeWriter);
+            }
 
-                context.put(JCodeModel.class, jcodeModel);
+            context.put(JCodeModel.class, jcodeModel);
 
-                for (String str : fileCodeWriter.getExcludeFileList()) {
-                    context.getExcludeFileList().add(str);
-                }
-                
+            for (String str : fileCodeWriter.getExcludeFileList()) {
+                context.getExcludeFileList().add(str);
             }
+
             return;
         } catch (IOException e) {
             Message msg = new Message("FAIL_TO_GENERATE_TYPES", LOG);

Modified: cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/WSDLToJavaProcessor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/WSDLToJavaProcessor.java?rev=1405021&r1=1405020&r2=1405021&view=diff
==============================================================================
--- cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/WSDLToJavaProcessor.java
(original)
+++ cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/WSDLToJavaProcessor.java
Fri Nov  2 16:02:35 2012
@@ -26,7 +26,6 @@ import java.util.List;
 import java.util.Map;
 import javax.xml.namespace.QName;
 
-import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.service.model.ServiceInfo;
 import org.apache.cxf.tools.common.ClassNameProcessor;
@@ -58,11 +57,6 @@ public class WSDLToJavaProcessor extends
         super.process();
 
         JavaModel jmodel = wsdlDefinitionToJavaModel(context.get(ServiceInfo.class));
-
-        if (jmodel == null) {
-            Message msg = new Message("FAIL_TO_CREATE_JAVA_MODEL", LOG);
-            throw new ToolException(msg);
-        }
         context.setJavaModel(jmodel);
     }
 

Modified: cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java?rev=1405021&r1=1405020&r2=1405021&view=diff
==============================================================================
--- cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
(original)
+++ cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
Fri Nov  2 16:02:35 2012
@@ -408,7 +408,7 @@ public class ParameterProcessor extends 
         method.setReturn(null);
         boolean qualified = ProcessorUtil.isSchemaFormQualified(context, outputPart.getElementQName());
 
-        if (outputWrapElement.size() == 1 && inputWrapElement != null) {
+        if (outputWrapElement.size() == 1) {
             QName outElement = outputWrapElement.iterator().next();
             boolean sameWrapperChild = false;
             for (QName inElement : inputWrapElement) {



Mime
View raw message