ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 36258] - Solution for ant ftp fails with Nullpointerexception when a symlink is evaluated in method checkRemoteSensitivity in FTP.java for a z/OS ftp server
Date Fri, 19 Aug 2005 09:12:38 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=36258>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36258





------- Additional Comments From stevel@apache.org  2005-08-19 11:12 -------
1. please try against CVS_HEAD or Ant1.6.5 and verify that the problem is still
there. I suspect it is, but, we need to be sure, and diffs against latest code
are easier to apply.

2, the patch hides a symptom, not the underlying cause, and we should fix it
properly. Assuming the defect is in this code (now moved a bit down the files)

            for (int icounter = 0; icounter < array.length; icounter++) {
                if (array[icounter].isDirectory()) {
                    if (!array[icounter].getName().equals(".")
                        && !array[icounter].getName().equals("..")) {
                        candidateFound = true;
                        target = fiddleName(array[icounter].getName());
                        getProject().log("will try to cd to "
                            + target + " where a directory called " +
array[icounter].getName()
                            + " exists", Project.MSG_DEBUG);
                        for (int pcounter = 0; pcounter < array.length;
pcounter++) {
                            if (array[pcounter].getName().equals(target) &&
pcounter != icounter) {
                                candidateFound = false;
                            }
                        }
                        if (candidateFound) {
                            break;
                        }
                    }
                }
            }

then we are iterating twice through the array. the outer loop needs to handle
nullness too, or we should strip null pointers out earlier. 

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message