butek 02/01/31 09:28:52
Modified: java/src/org/apache/axis/wsdl/toJava JavaWriter.java
Log:
Fix for empty documentation element failure. Submitted by Uma Shinde
([EMAIL PROTECTED]).
Revision Changes Path
1.5 +9 -2 xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaWriter.java
Index: JavaWriter.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaWriter.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- JavaWriter.java 10 Jan 2002 20:08:51 -0000 1.4
+++ JavaWriter.java 31 Jan 2002 17:28:52 -0000 1.5
@@ -67,6 +67,7 @@
import org.apache.axis.Constants;
import org.w3c.dom.Element;
+import org.w3c.dom.Node;
/**
* All of Wsdl2java's Writer implementations do some common stuff. All this
@@ -194,10 +195,16 @@
// This controls how many characters per line
final int LINE_LENGTH = 65;
- if (element == null)
+ if (element == null) {
return;
+ }
+
+ Node child = element.getFirstChild();
+ if (child == null) {
+ return;
+ }
- String comment = element.getFirstChild().getNodeValue();
+ String comment = child.getNodeValue();
// Strip out stuff that will really mess up our comments
comment = comment.replace('\r', ' ');