ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject cvs commit: ant/src/testcases/org/apache/tools/ant/taskdefs/optional/net FTPTest.java
Date Tue, 05 Aug 2003 17:38:57 GMT
antoine     2003/08/05 10:38:57

  Modified:    src/testcases/org/apache/tools/ant/taskdefs/optional/net
                        FTPTest.java
  Log:
  fix a problem of protected access to FTP.resolveFile
  
  Revision  Changes    Path
  1.2       +7 -4      ant/src/testcases/org/apache/tools/ant/taskdefs/optional/net/FTPTest.java
  
  Index: FTPTest.java
  ===================================================================
  RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/optional/net/FTPTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FTPTest.java	4 Aug 2003 22:23:57 -0000	1.1
  +++ FTPTest.java	5 Aug 2003 17:38:57 -0000	1.2
  @@ -70,7 +70,6 @@
           && !JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_1);
   
       private FTPClient ftp;
  -    private FTP ftptask;
       private boolean connectionSucceeded = true;
       private boolean loginSuceeded = true;
       private String tmpDir = null;
  @@ -86,10 +85,9 @@
           getProject().executeTarget("setup");
           tmpDir = getProject().getProperty("tmp.dir");
           ftp = new FTPClient();
  -        ftptask = new FTP();
           ftpFileSep = getProject().getProperty("ftp.filesep");
  -        ftptask.setSeparator(ftpFileSep);
  -        remoteTmpDir = ftptask.resolveFile(tmpDir);
  +        myFTPTask.setSeparator(ftpFileSep);
  +        remoteTmpDir = myFTPTask.resolveFile(tmpDir);
           String remoteHost = getProject().getProperty("ftp.host");
           int port = Integer.parseInt(getProject().getProperty("ftp.port"));
           String remoteUser = getProject().getProperty("ftp.user");
  @@ -526,5 +524,10 @@
           public FTP.FTPDirectoryScanner newScanner(FTPClient client) {
               return new FTP.FTPDirectoryScanner(client);
           }
  +        // provide public visibility
  +        public String resolveFile(String file) {
  +            return super.resolveFile(file);
  +        }
  +
       }
   }
  
  
  

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


Mime
View raw message