maven-scm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tryg...@apache.org
Subject cvs commit: maven-scm/maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog ChangeLogEntry.java
Date Tue, 02 Nov 2004 22:01:05 GMT
trygvis     2004/11/02 14:01:05

  Modified:    maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog
                        ChangeLogEntry.java
  Log:
  o Using the new collection api.
  
  Revision  Changes    Path
  1.3       +9 -8      maven-scm/maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog/ChangeLogEntry.java
  
  Index: ChangeLogEntry.java
  ===================================================================
  RCS file: /home/cvs/maven-scm/maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog/ChangeLogEntry.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ChangeLogEntry.java	26 Oct 2004 12:37:05 -0000	1.2
  +++ ChangeLogEntry.java	2 Nov 2004 22:01:05 -0000	1.3
  @@ -18,9 +18,10 @@
   
   import java.text.ParseException;
   import java.text.SimpleDateFormat;
  +import java.util.ArrayList;
   import java.util.Date;
  -import java.util.Enumeration;
  -import java.util.Vector;
  +import java.util.Iterator;
  +import java.util.List;
   
   /**
    * Change Log Entry - holds details about revisions to a file.
  @@ -82,7 +83,7 @@
       private String comment = "";
   
       /** ChangeLogFiles committed on the date, by the author, with comment */
  -    private Vector files = new Vector();
  +    private List files = new ArrayList();
   
       /**
        * Constructor for the Entry object
  @@ -114,7 +115,7 @@
        */
       public void addFile( ChangeLogFile file )
       {
  -        files.addElement( file );
  +        files.add( file );
       }
   
       /**
  @@ -125,7 +126,7 @@
        */
       public void addFile( String file, String revision )
       {
  -        files.addElement( new ChangeLogFile( file, revision ) );
  +        files.add( new ChangeLogFile( file, revision ) );
       }
   
       /**
  @@ -150,9 +151,9 @@
                 .append( "\t\t<time>" ).append( getTimeFormatted() ).append( "</time>\n"
)
                 .append( "\t\t<author><![CDATA[" ).append( author ).append( "]]></author>\n"
);
   
  -        for ( Enumeration e = files.elements(); e.hasMoreElements(); )
  +        for ( Iterator e = files.iterator(); e.hasNext(); )
           {
  -            ChangeLogFile file = (ChangeLogFile) e.nextElement();
  +            ChangeLogFile file = (ChangeLogFile) e.next();
               buffer.append( "\t\t<file>\n" )
                     .append( "\t\t\t<name>" ).append( escapeValue( file.getName() )
).append( "</name>\n" )
                     .append( "\t\t\t<revision>" ).append( file.getRevision() ).append(
"</revision>\n" )
  
  
  

Mime
View raw message