dion        02/04/14 08:04:52

  Modified:    src/java/org/apache/maven/cvslib ChangeLogFile.java
  Log:
  - added to String for debugging
  
  Revision  Changes    Path
  1.6       +20 -1     
jakarta-turbine-maven/src/java/org/apache/maven/cvslib/ChangeLogFile.java
  
  Index: ChangeLogFile.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/cvslib/ChangeLogFile.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ChangeLogFile.java        8 Apr 2002 02:08:36 -0000       1.5
  +++ ChangeLogFile.java        14 Apr 2002 15:04:51 -0000      1.6
  @@ -58,7 +58,7 @@
    * A set of information about revisions of a file as returned by CVS's log
    * command
    * @author <a href="mailto:[EMAIL PROTECTED]";>dIon Gillard</a>
  - * @version $Id: ChangeLogFile.java,v 1.5 2002/04/08 02:08:36 dion Exp $
  + * @version $Id: ChangeLogFile.java,v 1.6 2002/04/14 15:04:51 dion Exp $
    */
   public class ChangeLogFile
   {
  @@ -168,6 +168,25 @@
       public void setRevision(String revision)
       {
           this.revision = revision;
  +    }
  +
  +    /**
  +     * Provide a version of the object as a string for debugging purposes
  +     * @return a {@link String} made up of the properties of the object
  +     */
  +    public String toString() 
  +    {
  +        StringBuffer buffer = new StringBuffer(getName());
  +        if (getRevision() != null)
  +        {
  +            buffer.append(", ").append(getRevision());
  +        }
  +        if (getPreviousRevision() != null) 
  +        {
  +            buffer.append(", ").append(getPreviousRevision());
  +        }
  +        
  +        return buffer.toString();
       }
       
   } // end of ChangeLogFile
  
  
  


Reply via email to