scheu       02/03/11 09:18:33

  Modified:    java/src/org/apache/axis/wsdl/toJava
                        JavaComplexTypeWriter.java
  Log:
  The generated code for the equals method should check for nulls.
  
  Revision  Changes    Path
  1.19      +5 -2      
xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaComplexTypeWriter.java
  
  Index: JavaComplexTypeWriter.java
  ===================================================================
  RCS file: 
/home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaComplexTypeWriter.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- JavaComplexTypeWriter.java        11 Mar 2002 16:25:32 -0000      1.18
  +++ JavaComplexTypeWriter.java        11 Mar 2002 17:18:33 -0000      1.19
  @@ -346,8 +346,11 @@
                       pw.print("            " + variable + " == other.get" + 
                               Utils.capitalizeFirstChar(variable) + "()");
                   } else {
  -                    pw.print("            " + variable + ".equals(other.get" + 
  -                            Utils.capitalizeFirstChar(variable) + "())");
  +                    pw.println("            ((" + variable + "==null && other.get" +
  +                               Utils.capitalizeFirstChar(variable) + "()==null) || 
");
  +                    pw.println("             (" + variable + "!=null &&");
  +                    pw.print("              " + variable + ".equals(other.get" + 
  +                             Utils.capitalizeFirstChar(variable) + "())))");
                   }
                   if (i == (names.size() - 2))
                       pw.println(";");
  
  
  


Reply via email to