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/parser VMSFTPEntryParser.java
Date Fri, 09 Jan 2004 16:35:36 GMT
dfs         2004/01/09 08:35:36

  Modified:    net/src/java/org/apache/commons/net/ftp/parser
                        VMSFTPEntryParser.java
  Log:
  Changed name of DuplicateFilteringFileIterator.current to next, which
  more accurately reflects the role of the variable.
  
  Revision  Changes    Path
  1.13      +18 -18    jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/VMSFTPEntryParser.java
  
  Index: VMSFTPEntryParser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/VMSFTPEntryParser.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- VMSFTPEntryParser.java	9 Jan 2004 09:07:03 -0000	1.12
  +++ VMSFTPEntryParser.java	9 Jan 2004 16:35:36 -0000	1.13
  @@ -96,7 +96,7 @@
       private static class DuplicateFilteringFileIterator extends FTPFileIterator
       {
           FTPFile[] files;
  -        int current;
  +        int next;
   
           public DuplicateFilteringFileIterator(FTPFileIterator iterator) {
               FTPFile[] tempFiles = iterator.getFiles();
  @@ -122,7 +122,7 @@
                   files[index++] = ftpf;
               }
   
  -            current = 0;
  +            next = 0;
           }
               
           public FTPFile[] getFiles() {
  @@ -135,7 +135,7 @@
               FTPFile[] result;
               int remaining;
   
  -            remaining = files.length - current;
  +            remaining = files.length - next;
   
               if(quantityRequested > remaining)
                   quantityRequested = remaining;
  @@ -148,22 +148,22 @@
               }
   
               result = new FTPFile[quantityRequested];
  -            System.arraycopy(files, current, result, 0, result.length);
  -            current+=quantityRequested;
  +            System.arraycopy(files, next, result, 0, result.length);
  +            next+=quantityRequested;
   
               return result;
           }
   
           public boolean hasNext() {
  -            return (current < files.length && files.length > 0);
  +            return (next < files.length && files.length > 0);
           }
   
           public FTPFile next() {
               FTPFile result = null;
   
               if(hasNext()) {
  -                result = files[current];
  -                ++current;
  +                result = files[next];
  +                ++next;
               }
   
               return result;
  @@ -173,34 +173,34 @@
               FTPFile[] result;
               int start = 0;
   
  -            if(quantityRequested > current)
  -                quantityRequested = current;
  +            if(quantityRequested > next)
  +                quantityRequested = next;
               else if(quantityRequested < 0)
                   quantityRequested = 0;
               else if(quantityRequested == 0) {
  -                // interpret a 0 as meaning all items between 0 and current.
  +                // interpret a 0 as meaning all items between 0 and next.
                   // ask Steve if this is what he intended.
  -                quantityRequested = current;
  +                quantityRequested = next;
               } else
  -                start = current - quantityRequested;
  +                start = next - quantityRequested;
   
               result = new FTPFile[quantityRequested];
               System.arraycopy(files, start, result, 0, result.length);
  -            current = start;
  +            next = start;
   
               return result;
           }
   
           public boolean hasPrevious() {
  -            return (current > 0 && files.length > 0);
  +            return (next > 0 && files.length > 0);
           }
   
           public FTPFile previous() {
               FTPFile result = null;
   
               if(hasPrevious()) {
  -                --current;
  -                result = files[current];
  +                --next;
  +                result = files[next];
               }
   
               return result;
  
  
  

---------------------------------------------------------------------
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