commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject cvs commit: jakarta-commons/net/src/java/org/apache/commons/net/ftp FTPClient.java
Date Mon, 22 Dec 2003 22:11:28 GMT
dfs         2003/12/22 14:11:28

  Modified:    net/src/java/org/apache/commons/net/ftp FTPClient.java
  Log:
  Explicitly initialized __restartOffset to zero in __initDefaults().
  Bugzilla report 25620  by ajpaterson@compuserve.com pointed out
  that this variable was not explicitly initialized.  Even though
  in Java the default value is zero, beyond code
  understanding/maintenance, it is a problem because __restsartOffset
  is not reset the various times __initDefaults() is called
  (e.g., reinitialize(), connect()), so values will persist between
  connectionsand in other situations where it should be reset.
  
  Revision  Changes    Path
  1.14      +7 -6      jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPClient.java
  
  Index: FTPClient.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPClient.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- FTPClient.java	29 Jul 2003 02:46:20 -0000	1.13
  +++ FTPClient.java	22 Dec 2003 22:11:26 -0000	1.14
  @@ -269,12 +269,13 @@
       private void __initDefaults()
       {
           __dataConnectionMode = ACTIVE_LOCAL_DATA_CONNECTION_MODE;
  -        __passiveHost = null;
  -        __passivePort = -1;
  -        __fileType = FTP.ASCII_FILE_TYPE;
  -        __fileStructure = FTP.FILE_STRUCTURE;
  -        __fileFormat = FTP.NON_PRINT_TEXT_FORMAT;
  -        __fileTransferMode = FTP.STREAM_TRANSFER_MODE;
  +        __passiveHost        = null;
  +        __passivePort        = -1;
  +        __fileType           = FTP.ASCII_FILE_TYPE;
  +        __fileStructure      = FTP.FILE_STRUCTURE;
  +        __fileFormat         = FTP.NON_PRINT_TEXT_FORMAT;
  +        __fileTransferMode   = FTP.STREAM_TRANSFER_MODE;
  +        __restartOffset      = 0;
       }
   
       private String __parsePathname(String reply)
  
  
  

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


Mime
View raw message