cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r830985 - in /cxf/branches/2.1.x-fixes: ./ tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
Date Thu, 29 Oct 2009 14:58:42 GMT
Author: dkulp
Date: Thu Oct 29 14:58:41 2009
New Revision: 830985

URL: http://svn.apache.org/viewvc?rev=830985&view=rev
Log:
Merged revisions 830978 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/branches/2.2.x-fixes

................
  r830978 | dkulp | 2009-10-29 10:52:42 -0400 (Thu, 29 Oct 2009) | 9 lines
  
  Merged revisions 830966 via svnmerge from 
  https://svn.apache.org/repos/asf/cxf/trunk
  
  ........
    r830966 | dkulp | 2009-10-29 10:40:57 -0400 (Thu, 29 Oct 2009) | 1 line
    
    [CXF-1817] Add a depth check to make sure we don't recurse forever
  ........
................

Modified:
    cxf/branches/2.1.x-fixes/   (props changed)
    cxf/branches/2.1.x-fixes/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java

Propchange: cxf/branches/2.1.x-fixes/
            ('svn:mergeinfo' removed)

Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.1.x-fixes/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java?rev=830985&r1=830984&r2=830985&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
(original)
+++ cxf/branches/2.1.x-fixes/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
Thu Oct 29 14:58:41 2009
@@ -626,17 +626,28 @@
                         writeDefaultType(writer, m.listParamTypes()[0], path + "/" + m.name().substring(3));
                         writer.write(");");
                     } else {
-                        writeDefaultValue(writer, indent,
-                                          path + "/" + m.name().substring(3),
-                                          varName + m.name().substring(3),
-                                          m.listParamTypes()[0]);
-                        writer.write("\n");
+                        int idx = path.indexOf("/" + m.name().substring(3) + "/");
+                        if (idx > 0) {
+                            idx = path.indexOf("/" + m.name().substring(3) + "/", idx + 1);
+                        }
+                        boolean hasTwo = idx > 0;
+                        if (!hasTwo) {
+                            writeDefaultValue(writer, indent,
+                                              path + "/" + m.name().substring(3),
+                                              varName + m.name().substring(3),
+                                              m.listParamTypes()[0]);
+                            writer.write("\n");
+                        }
                         writer.write(indent);
                         writer.write(varName);
                         writer.write(".");
                         writer.write(m.name());
                         writer.write("(");
-                        writer.write(varName + m.name().substring(3));
+                        if (!hasTwo) {
+                            writer.write(varName + m.name().substring(3));
+                        } else {
+                            writer.write("null");
+                        }
                         writer.write(");");
                     }
                 } else if (m.type().fullName().startsWith("java.util.List")) {



Mime
View raw message