[ ant-contrib-Bugs-1716161 ] remoteAnt task sendfile command causes NullPointerException

"SourceForge.net" <[email protected]>
Newsgroups gmane.comp.java.ant-contrib.devel
Message-ID <[email protected]>
Bugs item #1716161, was opened at 2007-05-09 15:00
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=416920&aid=1716161&group_id=36177

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: process
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Jeff Huey (jhuey222)
Assigned to: Nobody/Anonymous (nobody)
Summary: remoteAnt task sendfile command causes NullPointerException

Initial Comment:
Cannot send a file using the remoteAnt task sendfile command due to a NullPointerException.

The NullPointerException is in line 140 of src/java/net/sf/antcontrib/antserver/commands/SendFileCommand.java

Line with bug:
            if (! new File(todir, tofile).getCanonicalPath().startsWith(project.getBaseDir().getCanonicalPath())) {

Line with bug fix:
            if (! new File(todir).getCanonicalPath().startsWith(project.getBaseDir().getCanonicalPath())) {


I can now send files successfully using the remoteAnt task sendfile command with the bug fix.

Attached is the SendCommand.java file with the bug fix.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=416920&aid=1716161&group_id=36177

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.