You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2002/05/14 22:30:27 UTC
DO NOT REPLY [Bug 9082] New: -
WsdlToDotnet task null pointer exception when using URL
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9082>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9082
WsdlToDotnet task null pointer exception when using URL
Summary: WsdlToDotnet task null pointer exception when using URL
Product: Ant
Version: 1.5Beta1
Platform: Other
OS/Version: MacOS 9
Status: NEW
Severity: Normal
Priority: Other
Component: Optional Tasks
AssignedTo: ant-dev@jakarta.apache.org
ReportedBy: rfeak@taskport.com
The WsdlToDotnet task will throw a null pointer exception if you specify a URL
instead of a filename.
The documentation clearly states that you should be able to supply one or the
other, but not both. The code also seems to support this, but it mistakenly
dereferences the filename even if one has not been supplied.
I snagged the code snippet below from WsdlToDotnet.java. I have not run this
through a debugger to find the exact line that is throwing the null pointer
exception, but I would guess that there are multiple opportunities in the code
below. The srcFile is not being set to anything before the following code, a
couple of null checks here should fix the problem.
------------------------------------------------------------------
command.addArgument(srcFile.toString());
command.addArgument(url);
//rebuild unless the dest file is newer than the source file
boolean rebuild = true;
if (srcFile.exists() && destFile.exists() &&
srcFile.lastModified() <= destFile.lastModified()) {
rebuild = false;
}
----------------------------------------------------------------
The code seems to work fine when supplied with a .wsdl file.
Thanks for all the good work. Keep it up.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>