You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by sc...@apache.org on 2004/09/15 04:24:04 UTC

cvs commit: jakarta-commons/net/src/java/org/apache/commons/net/ftp FTPClient.java FTPListParseEngine.java

scohen      2004/09/14 19:24:04

  Modified:    net/src/java/org/apache/commons/net/ftp FTPClient.java
                        FTPListParseEngine.java
  Log:
  add comments indicating the possibility of null entries in the arrays returned by listFiles(), etc.
  
  Revision  Changes    Path
  1.40      +21 -1     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.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- FTPClient.java	8 Sep 2004 17:14:46 -0000	1.39
  +++ FTPClient.java	15 Sep 2004 02:24:04 -0000	1.40
  @@ -2029,6 +2029,10 @@
        * @return The list of file information contained in the given path in
        *         the format determined by the parser represented by the
        *         <code> parserKey </code> parameter.
  +     *         <p><b> 
  +     * 		   NOTE:</b> This array may contain null members if any of the 
  +     *         individual file listings failed to parse.  The caller should 
  +     *         check each entry for null before referencing it.
        * @exception FTPConnectionClosedException
        *                   If the FTP server prematurely closes the connection
        *                   as a result of the client being idle or some other
  @@ -2119,7 +2123,11 @@
        * used.
        * <p>
        * @return The list of file information contained in the current directory
  -     *         in the format determined by the autodetection mechanism
  +     *         in the format determined by the autodetection mechanism.  
  +     *         <p><b> 
  +     * 		   NOTE:</b> This array may contain null members if any of the 
  +     *         individual file listings failed to parse.  The caller should 
  +     *         check each entry for null before referencing it.
        * @exception FTPConnectionClosedException
        *                   If the FTP server prematurely closes the connection
        *                   as a result of the client being idle or some other
  @@ -2406,6 +2414,10 @@
        * @param pathname  The file or directory to list.
        * @return The list of file information contained in the given path in
        *         the format determined by the <code> parser </code> parameter.
  +     *         <p><b> 
  +     * 		   NOTE:</b> This array may contain null members if any of the 
  +     *         individual file listings failed to parse.  The caller should 
  +     *         check each entry for null before referencing it.
        * @exception FTPConnectionClosedException
        *      If the FTP server prematurely closes the connection as a result
        *      of the client being idle or some other reason causing the server
  @@ -2416,6 +2428,10 @@
        *
        * @return The list of file information contained in the given path in
        *         the format determined by<code> parserKey </code>parameter.
  +     *         <p><b> 
  +     * 		   NOTE:</b> This array may contain null members if any of the 
  +     *         individual file listings failed to parse.  The caller should 
  +     *         check each entry for null before referencing it.
        *
        * @exception IOException
        * @since 5 Jan 2004
  @@ -2453,6 +2469,10 @@
        *
        * @return The list of file information contained in the given path in
        *         the format determined by the <code> parser </code> parameter.
  +     *         <p><b> 
  +     * 		   NOTE:</b> This array may contain null members if any of the 
  +     *         individual file listings failed to parse.  The caller should 
  +     *         check each entry for null before referencing it.
        * @exception FTPConnectionClosedException
        *                   If the FTP server prematurely closes the connection as a result
        *                   of the client being idle or some other reason causing the server
  
  
  
  1.8       +13 -1     jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPListParseEngine.java
  
  Index: FTPListParseEngine.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPListParseEngine.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- FTPListParseEngine.java	22 Apr 2004 00:48:07 -0000	1.7
  +++ FTPListParseEngine.java	15 Sep 2004 02:24:04 -0000	1.8
  @@ -147,6 +147,10 @@
        * objects starting at the current position of this iterator within its
        * list and at least the number of elements which  exist in the list at
        * and after its current position.
  +     * <p><b> 
  +     * NOTE:</b> This array may contain null members if any of the 
  +     * individual file listings failed to parse.  The caller should 
  +     * check each entry for null before referencing it.
        */
       public FTPFile[] getNext(int quantityRequested) {
           List tmpResults = new LinkedList();
  @@ -182,6 +186,10 @@
        * list and at least the number of elements which  exist in the list at
        * and after its current position.  This array will be in the same order
        * as the underlying list (not reversed).
  +     * <p><b> 
  +     * NOTE:</b> This array may contain null members if any of the 
  +     * individual file listings failed to parse.  The caller should 
  +     * check each entry for null before referencing it.
        */
       public FTPFile[] getPrevious(int quantityRequested) {
           List tmpResults = new LinkedList();
  @@ -201,6 +209,10 @@
        *
        * @return an array of FTPFile objects containing the whole list of
        *         files returned by the server as read by this object's parser.
  +     * <p><b> 
  +     * NOTE:</b> This array may contain null members if any of the 
  +     * individual file listings failed to parse.  The caller should 
  +     * check each entry for null before referencing it.
        * @exception IOException
        */
       public FTPFile[] getFiles()
  
  
  

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