cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [3/3] cxf git commit: [CXF-6894] prevent NPE if request uses anonymous types
Date Thu, 30 Mar 2017 22:13:40 GMT
[CXF-6894] prevent NPE if request uses anonymous types


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

Branch: refs/heads/master
Commit: 6fd76780cc60f477ca0ccbad2b2298051657ef2c
Parents: 408fe33
Author: Daniel Kulp <dkulp@apache.org>
Authored: Thu Mar 30 16:40:34 2017 -0400
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Thu Mar 30 16:40:34 2017 -0400

----------------------------------------------------------------------
 .../jaxws/validator/WrapperStyleNameCollisionValidator.java    | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/6fd76780/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 40e4fe0..b23b48c 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
@@ -167,9 +167,11 @@ public class WrapperStyleNameCollisionValidator extends ServiceValidator
{
                         String mappedName = mapElementName(operation,
                                                            operation.getUnwrappedOperation().getOutput(),
                                                            element);
+                        
+                        QName mn = names.get(mappedName);
                         if (names.containsKey(mappedName)
-                            &&  !(names.get(mappedName) == element.getSchemaTypeName()
-                                || names.get(mappedName).equals(element.getSchemaTypeName())))
{
+                            &&  !(mn == element.getSchemaTypeName()
+                                || (mn != null && mn.equals(element.getSchemaTypeName()))))
{
                             handleErrors(names.get(mappedName), element);
                             return false;
                         } else {


Mime
View raw message