ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs Tstamp.java
Date Sun, 06 Jan 2002 02:00:14 GMT
donaldp     02/01/05 18:00:14

  Modified:    proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs
                        Tstamp.java
  Log:
  Remove access to project as not needed
  
  Revision  Changes    Path
  1.12      +12 -13    jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Tstamp.java
  
  Index: Tstamp.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Tstamp.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Tstamp.java	23 Dec 2001 06:33:35 -0000	1.11
  +++ Tstamp.java	6 Jan 2002 02:00:14 -0000	1.12
  @@ -18,7 +18,6 @@
   import java.util.StringTokenizer;
   import java.util.TimeZone;
   import org.apache.myrmidon.api.TaskException;
  -import org.apache.tools.ant.Project;
   import org.apache.tools.ant.Task;
   import org.apache.tools.ant.types.EnumeratedAttribute;
   
  @@ -31,24 +30,24 @@
    * @author conor@cognet.com.au
    * @author <a href="mailto:umagesh@apache.org">Magesh Umasankar</a>
    */
  -public class Tstamp extends Task
  +public class Tstamp
  +    extends Task
   {
  -
       private ArrayList customFormats = new ArrayList();
  -    private String prefix = "";
  +    private String m_prefix = "";
   
       public void setPrefix( String prefix )
       {
  -        this.prefix = prefix;
  -        if( !this.prefix.endsWith( "." ) )
  +        this.m_prefix = prefix;
  +        if( !this.m_prefix.endsWith( "." ) )
           {
  -            this.prefix += ".";
  +            this.m_prefix += ".";
           }
       }
   
       public CustomFormat createFormat()
       {
  -        CustomFormat cts = new CustomFormat( prefix );
  +        CustomFormat cts = new CustomFormat( m_prefix );
           customFormats.add( cts );
           return cts;
       }
  @@ -61,19 +60,19 @@
               Date d = new Date();
   
               SimpleDateFormat dstamp = new SimpleDateFormat( "yyyyMMdd" );
  -            setProperty( prefix + "DSTAMP", dstamp.format( d ) );
  +            setProperty( m_prefix + "DSTAMP", dstamp.format( d ) );
   
               SimpleDateFormat tstamp = new SimpleDateFormat( "HHmm" );
  -            setProperty( prefix + "TSTAMP", tstamp.format( d ) );
  +            setProperty( m_prefix + "TSTAMP", tstamp.format( d ) );
   
               SimpleDateFormat today = new SimpleDateFormat( "MMMM d yyyy", Locale.US );
  -            setProperty( prefix + "TODAY", today.format( d ) );
  +            setProperty( m_prefix + "TODAY", today.format( d ) );
   
               Iterator i = customFormats.iterator();
               while( i.hasNext() )
               {
                   CustomFormat cts = (CustomFormat)i.next();
  -                cts.execute( getProject(), d );
  +                cts.execute( d );
               }
   
           }
  @@ -206,7 +205,7 @@
               field = unit.getCalendarField();
           }
   
  -        public void execute( Project project, Date date )
  +        public void execute( Date date )
               throws TaskException
           {
               if( propertyName == null )
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message