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-myrmidon/framework/src/todo/org/apache/tools/todo/taskdefs/archive Expand.java
Date Fri, 24 May 2002 04:30:59 GMT
donaldp     02/05/23 21:30:59

  Modified:    antlib/src/java/org/apache/antlib/core
                        LoadPropertyFileTask.java
                        LoadPropertyResourceTask.java
               antlib/src/java/org/apache/antlib/file CopyTask.java
                        Delete.java Touch.java
               antlib/src/java/org/apache/antlib/java
                        JavaCompilerAdaptor.java
               antlib/src/java/org/apache/antlib/nativelib
                        LoadEnvironment.java
               antlib/src/java/org/apache/antlib/project TargetTask.java
               api/src/java/org/apache/myrmidon/api TaskContext.java
               container/src/java/org/apache/myrmidon/components/workspace
                        DefaultTaskContext.java
               framework/src/java/org/apache/myrmidon/framework/java
                        ExecuteJava.java
               framework/src/java/org/apache/myrmidon/framework/nativelib
                        Execute.java
               framework/src/todo/org/apache/tools/todo/taskdefs/archive
                        Expand.java
  Log:
  Remove the TaskContext.is{Level}Enabled() methods. Currently this means all output goes
to listener.
  
  Next listeners need to be made to be filtering.
  
  Revision  Changes    Path
  1.2       +3 -6      jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/core/LoadPropertyFileTask.java
  
  Index: LoadPropertyFileTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/core/LoadPropertyFileTask.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- LoadPropertyFileTask.java	15 May 2002 10:11:54 -0000	1.1
  +++ LoadPropertyFileTask.java	24 May 2002 04:30:59 -0000	1.2
  @@ -45,12 +45,9 @@
               throw new TaskException( message );
           }
   
  -        if( getContext().isDebugEnabled() )
  -        {
  -            final String message =
  -                REZ.getString( "loadprop.file.notice", m_file.getAbsolutePath() );
  -            getContext().debug( message );
  -        }
  +        final String debug =
  +            REZ.getString( "loadprop.file.notice", m_file.getAbsolutePath() );
  +        getContext().debug( debug );
   
           if( !m_file.exists() )
           {
  
  
  
  1.2       +10 -8     jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/core/LoadPropertyResourceTask.java
  
  Index: LoadPropertyResourceTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/core/LoadPropertyResourceTask.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- LoadPropertyResourceTask.java	15 May 2002 10:11:54 -0000	1.1
  +++ LoadPropertyResourceTask.java	24 May 2002 04:30:59 -0000	1.2
  @@ -18,7 +18,7 @@
    * A task that loads properties from a resource.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.1 $ $Date: 2002/05/15 10:11:54 $
  + * @version $Revision: 1.2 $ $Date: 2002/05/24 04:30:59 $
    *
    * @ant.task name="load-resource"
    */
  @@ -53,17 +53,19 @@
               throw new TaskException( message );
           }
   
  -        if( getContext().isDebugEnabled() )
  -        {
  -            final String message = REZ.getString( "load-resource.loading.notice", m_resource
);
  -            getContext().debug( message );
  -        }
  +            final String debug =
  +                REZ.getString( "load-resource.loading.notice",
  +                               m_resource );
  +            getContext().debug( debug );
   
  -        final ClassLoader classLoader = FileListUtil.createClassLoader( m_classpath, getContext()
);
  +        final ClassLoader classLoader =
  +            FileListUtil.createClassLoader( m_classpath, getContext() );
           final InputStream input = classLoader.getResourceAsStream( m_resource );
           if( input == null )
           {
  -            final String message = REZ.getString( "load-resource.missing-resource.notice",
m_resource );
  +            final String message =
  +                REZ.getString( "load-resource.missing-resource.notice",
  +                               m_resource );
               getContext().info( message );
               return null;
           }
  
  
  
  1.2       +1 -4      jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/file/CopyTask.java
  
  Index: CopyTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/file/CopyTask.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CopyTask.java	14 Apr 2002 10:56:03 -0000	1.1
  +++ CopyTask.java	24 May 2002 04:30:59 -0000	1.2
  @@ -34,7 +34,7 @@
    * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
    * @author <A href="gholam@xtra.co.nz">Michael McCallum</A>
    * @author <a href="mailto:umagesh@rediffmail.com">Magesh Umasankar</a>
  - * @version $Revision: 1.1 $ $Date: 2002/04/14 10:56:03 $
  + * @version $Revision: 1.2 $ $Date: 2002/05/24 04:30:59 $
    */
   public class CopyTask
       extends AbstractTask
  @@ -438,13 +438,10 @@
        */
       private void displayFilecountNotice( final int count )
       {
  -        if( getContext().isInfoEnabled() )
  -        {
               final String message =
                   REZ.getString( "copy.file-count.notice",
                                  new Integer( count ),
                                  m_destDir.getAbsolutePath() );
               getContext().info( message );
  -        }
       }
   }
  
  
  
  1.2       +13 -18    jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/file/Delete.java
  
  Index: Delete.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/file/Delete.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Delete.java	14 Apr 2002 10:56:03 -0000	1.1
  +++ Delete.java	24 May 2002 04:30:59 -0000	1.2
  @@ -26,7 +26,7 @@
    * @author <a href="mailto:tad1@cornell.edu">Tom Dimock</a>
    * @author <a href="mailto:glennm@ca.ibm.com">Glenn McAllister</a>
    * @author <a href="mailto:jon@latchkey.com">Jon S. Stevens</a>
  - * @version $Revision: 1.1 $ $Date: 2002/04/14 10:56:03 $
  + * @version $Revision: 1.2 $ $Date: 2002/05/24 04:30:59 $
    */
   public class Delete
       extends AbstractTask
  @@ -136,18 +136,16 @@
               deleteFiles( list );
           }
   
  -        if( getContext().isDebugEnabled() )
  -        {
  -            final String message =
  -                REZ.getString( "delete.delete-dir.notice", m_dir.getAbsolutePath() );
  -            getContext().debug( message );
  -        }
  +        final String message =
  +            REZ.getString( "delete.delete-dir.notice",
  +                           m_dir.getAbsolutePath() );
  +        getContext().debug( message );
   
           if( !baseDir.delete() )
           {
  -            final String message =
  +            final String error =
                   REZ.getString( "delete.delete-dir.error", m_dir.getAbsolutePath() );
  -            throw new TaskException( message );
  +            throw new TaskException( error );
           }
       }
   
  @@ -171,18 +169,15 @@
       private void deleteFile( final File file )
           throws TaskException
       {
  -        if( getContext().isDebugEnabled() )
  -        {
  -            final String message =
  -                REZ.getString( "delete.delete-file.notice", file.getAbsolutePath() );
  -            getContext().debug( message );
  -        }
  +        final String message =
  +            REZ.getString( "delete.delete-file.notice", file.getAbsolutePath() );
  +        getContext().debug( message );
   
           if( !file.delete() )
           {
  -            final String message =
  +            final String error =
                   REZ.getString( "delete.delete-file.error", file.getAbsolutePath() );
  -            throw new TaskException( message );
  +            throw new TaskException( error );
           }
       }
   
  @@ -190,7 +185,7 @@
        * remove an array of files in a directory, and a list of subdirectories
        * which will only be deleted if 'includeEmpty' is true
        *
  -     * @param d directory to work from
  +     * @param baseDir directory to work from
        * @param files array of files to delete; can be of zero length
        * @param dirs array of directories to delete; can of zero length
        */
  
  
  
  1.3       +8 -7      jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/file/Touch.java
  
  Index: Touch.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/file/Touch.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Touch.java	23 May 2002 01:50:24 -0000	1.2
  +++ Touch.java	24 May 2002 04:30:59 -0000	1.3
  @@ -32,7 +32,7 @@
    * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
    * @author <a href="mailto:mj@servidium.com">Michael J. Sikorsky</a>
    * @author <a href="mailto:shaw@servidium.com">Robert Shaw</a>
  - * @version $Revision: 1.2 $ $Date: 2002/05/23 01:50:24 $
  + * @version $Revision: 1.3 $ $Date: 2002/05/24 04:30:59 $
    */
   public class Touch
       extends AbstractTask
  @@ -141,11 +141,9 @@
           {
               if( !m_file.exists() )
               {
  -                if( getContext().isInfoEnabled() )
  -                {
  -                    final String message = REZ.getString( "touch.create.notice", m_file
);
  -                    getContext().info( message );
  -                }
  +                final String notice =
  +                    REZ.getString( "touch.create.notice", m_file );
  +                getContext().info( notice );
   
                   try
                   {
  @@ -155,7 +153,10 @@
                   }
                   catch( final IOException ioe )
                   {
  -                    final String message = REZ.getString( "touch.no-touch.error", m_file,
ioe );
  +                    final String message =
  +                        REZ.getString( "touch.no-touch.error",
  +                                       m_file,
  +                                       ioe );
                       throw new TaskException( message, ioe );
                   }
               }
  
  
  
  1.3       +1 -4      jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/java/JavaCompilerAdaptor.java
  
  Index: JavaCompilerAdaptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/java/JavaCompilerAdaptor.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JavaCompilerAdaptor.java	24 Apr 2002 02:20:58 -0000	1.2
  +++ JavaCompilerAdaptor.java	24 May 2002 04:30:59 -0000	1.3
  @@ -29,7 +29,7 @@
    * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
    * @author <a href="mailto:jayglanville@home.com">J D Glanville</a>
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.2 $ $Date: 2002/04/24 02:20:58 $
  + * @version $Revision: 1.3 $ $Date: 2002/05/24 04:30:59 $
    *
    * @ant.role name="java-compiler"
    */
  @@ -165,15 +165,12 @@
           // Log
           final String message = "Compiling " + compileList.length + " source files to "
+ m_destDir;
           getContext().info( message );
  -        if( getContext().isVerboseEnabled() )
  -        {
               getContext().verbose( "Compiling the following files:" );
               for( int i = 0; i < compileList.length; i++ )
               {
                   final File file = compileList[ i ];
                   getContext().verbose( file.getAbsolutePath() );
               }
  -        }
       }
   
       /**
  
  
  
  1.2       +8 -10     jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/nativelib/LoadEnvironment.java
  
  Index: LoadEnvironment.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/nativelib/LoadEnvironment.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- LoadEnvironment.java	14 Apr 2002 10:56:03 -0000	1.1
  +++ LoadEnvironment.java	24 May 2002 04:30:59 -0000	1.2
  @@ -52,14 +52,11 @@
               m_prefix += ".";
           }
   
  -        if( getContext().isDebugEnabled() )
  -        {
  -            final String displayPrefix =
  -                m_prefix.substring( 0, m_prefix.length() - 1 );
  -            final String message =
  -                REZ.getString( "loadenv.prefix.notice", displayPrefix );
  -            getContext().debug( message );
  -        }
  +        final String displayPrefix =
  +            m_prefix.substring( 0, m_prefix.length() - 1 );
  +        final String message =
  +            REZ.getString( "loadenv.prefix.notice", displayPrefix );
  +        getContext().debug( message );
   
           final Properties environment = loadNativeEnvironment();
           final Iterator keys = environment.keySet().iterator();
  @@ -70,8 +67,9 @@
   
               if( value.equals( "" ) )
               {
  -                final String message = REZ.getString( "loadenv.ignoring-empty.warn", key
);
  -                getContext().warn( message );
  +                final String warning =
  +                    REZ.getString( "loadenv.ignoring-empty.warn", key );
  +                getContext().warn( warning );
               }
               else
               {
  
  
  
  1.7       +18 -30    jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/project/TargetTask.java
  
  Index: TargetTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/project/TargetTask.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- TargetTask.java	23 May 2002 04:29:45 -0000	1.6
  +++ TargetTask.java	24 May 2002 04:30:59 -0000	1.7
  @@ -23,7 +23,7 @@
    * A simple task to task to execute a group of tasks.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.6 $ $Date: 2002/05/23 04:29:45 $
  + * @version $Revision: 1.7 $ $Date: 2002/05/24 04:30:59 $
    * @ant.task name="target"
    */
   public class TargetTask
  @@ -89,12 +89,9 @@
   
           executeDependencies();
   
  -        if( getContext().isVerboseEnabled() )
  -        {
  -            final String message =
  -                REZ.getString( "target.exec.notice", m_name );
  -            getContext().verbose( message );
  -        }
  +        final String message =
  +            REZ.getString( "target.exec.notice", m_name );
  +        getContext().verbose( message );
   
           executeContainedTasks();
       }
  @@ -147,14 +144,11 @@
           {
               final Dependency dependency = m_dependencies[ i ];
   
  -            if( getContext().isDebugEnabled() )
  -            {
  -                final String message =
  -                    REZ.getString( "target.exec-depends.notice",
  -                                   m_name,
  -                                   dependency );
  -                getContext().debug( message );
  -            }
  +            final String message =
  +                REZ.getString( "target.exec-depends.notice",
  +                               m_name,
  +                               dependency );
  +            getContext().debug( message );
   
               executeProjectTarget( dependency );
           }
  @@ -219,13 +213,10 @@
           {
               final ModelElement task = tasks[ i ];
   
  -            if( getContext().isDebugEnabled() )
  -            {
  -                final String message =
  -                    REZ.getString( "target.task-exec.notice",
  -                                   task.getName() );
  -                getContext().debug( message );
  -            }
  +            final String message =
  +                REZ.getString( "target.task-exec.notice",
  +                               task.getName() );
  +            getContext().debug( message );
               executeTask( task );
           }
       }
  @@ -287,14 +278,11 @@
               dependsList.add( new Dependency( projectName, targetName ) );
           }
   
  -        if( getContext().isDebugEnabled() )
  -        {
  -            final String message =
  -                REZ.getString( "target.depends.notice",
  -                               m_name,
  -                               dependsList );
  -            getContext().debug( message );
  -        }
  +        final String message =
  +            REZ.getString( "target.depends.notice",
  +                           m_name,
  +                           dependsList );
  +        getContext().debug( message );
   
           return (Dependency[])dependsList.toArray( new Dependency[ dependsList.size() ]
);
       }
  
  
  
  1.35      +1 -29     jakarta-ant-myrmidon/api/src/java/org/apache/myrmidon/api/TaskContext.java
  
  Index: TaskContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/api/src/java/org/apache/myrmidon/api/TaskContext.java,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- TaskContext.java	23 May 2002 01:50:24 -0000	1.34
  +++ TaskContext.java	24 May 2002 04:30:59 -0000	1.35
  @@ -16,7 +16,7 @@
    * path between the container and the Task.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.34 $ $Date: 2002/05/23 01:50:24 $
  + * @version $Revision: 1.35 $ $Date: 2002/05/24 04:30:59 $
    *
    * @todo Add some additional standard properties.
    */
  @@ -154,13 +154,6 @@
       void verbose( String message, Throwable throwable );
   
       /**
  -     * Determine if messages of priority "verbose" will be logged.
  -     *
  -     * @return true if "verbose" messages will be logged
  -     */
  -    boolean isVerboseEnabled();
  -
  -    /**
        * Log a info message.
        *
        * @param message the message
  @@ -176,13 +169,6 @@
       void info( String message, Throwable throwable );
   
       /**
  -     * Determine if messages of priority "info" will be logged.
  -     *
  -     * @return true if "info" messages will be logged
  -     */
  -    boolean isInfoEnabled();
  -
  -    /**
        * Log a warn message.
        *
        * @param message the message
  @@ -198,13 +184,6 @@
       void warn( String message, Throwable throwable );
   
       /**
  -     * Determine if messages of priority "warn" will be logged.
  -     *
  -     * @return true if "warn" messages will be logged
  -     */
  -    boolean isWarnEnabled();
  -
  -    /**
        * Log a error message.
        *
        * @param message the message
  @@ -218,12 +197,5 @@
        * @param throwable the throwable
        */
       void error( String message, Throwable throwable );
  -
  -    /**
  -     * Determine if messages of priority "error" will be logged.
  -     *
  -     * @return true if "error" messages will be logged
  -     */
  -    boolean isErrorEnabled();
   }
   
  
  
  
  1.49      +47 -62    jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/workspace/DefaultTaskContext.java
  
  Index: DefaultTaskContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/workspace/DefaultTaskContext.java,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- DefaultTaskContext.java	24 May 2002 04:19:02 -0000	1.48
  +++ DefaultTaskContext.java	24 May 2002 04:30:59 -0000	1.49
  @@ -16,8 +16,8 @@
   import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.myrmidon.api.TaskContext;
   import org.apache.myrmidon.api.TaskException;
  -import org.apache.myrmidon.api.event.TaskEvent;
   import org.apache.myrmidon.api.event.LogLevel;
  +import org.apache.myrmidon.api.event.TaskEvent;
   import org.apache.myrmidon.interfaces.event.TaskEventManager;
   import org.apache.myrmidon.interfaces.executor.ExecutionFrame;
   import org.apache.myrmidon.interfaces.property.PropertyResolver;
  @@ -29,7 +29,7 @@
    * Default implementation of TaskContext.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.48 $ $Date: 2002/05/24 04:19:02 $
  + * @version $Revision: 1.49 $ $Date: 2002/05/24 04:30:59 $
    */
   public class DefaultTaskContext
       implements TaskContext
  @@ -266,18 +266,15 @@
        */
       public void debug( final String message, final Throwable throwable )
       {
  -        if( isDebugEnabled() )
  -        {
  -            final TaskEvent event =
  -                new TaskEvent( m_frame.getName(),
  -                               getName(),
  -                               m_location,
  -                               message,
  -                               throwable,
  -                               LogLevel.DEBUG,
  -                               0 );
  -            getEventManager().fireTaskMessage( event );
  -        }
  +        final TaskEvent event =
  +            new TaskEvent( m_frame.getName(),
  +                           getName(),
  +                           m_location,
  +                           message,
  +                           throwable,
  +                           LogLevel.DEBUG,
  +                           0 );
  +        getEventManager().fireTaskMessage( event );
       }
   
       /**
  @@ -308,18 +305,15 @@
        */
       public void verbose( final String message, final Throwable throwable )
       {
  -        if( isVerboseEnabled() )
  -        {
  -            final TaskEvent event =
  -                new TaskEvent( m_frame.getName(),
  -                               getName(),
  -                               m_location,
  -                               message,
  -                               throwable,
  -                               LogLevel.VERBOSE,
  -                               0 );
  -            getEventManager().fireTaskMessage( event );
  -        }
  +        final TaskEvent event =
  +            new TaskEvent( m_frame.getName(),
  +                           getName(),
  +                           m_location,
  +                           message,
  +                           throwable,
  +                           LogLevel.VERBOSE,
  +                           0 );
  +        getEventManager().fireTaskMessage( event );
       }
   
       /**
  @@ -350,18 +344,15 @@
        */
       public void info( final String message, final Throwable throwable )
       {
  -        if( isInfoEnabled() )
  -        {
  -            final TaskEvent event =
  -                new TaskEvent( m_frame.getName(),
  -                               getName(),
  -                               m_location,
  -                               message,
  -                               throwable,
  -                               LogLevel.INFO,
  -                               0 );
  -            getEventManager().fireTaskMessage( event );
  -        }
  +        final TaskEvent event =
  +            new TaskEvent( m_frame.getName(),
  +                           getName(),
  +                           m_location,
  +                           message,
  +                           throwable,
  +                           LogLevel.INFO,
  +                           0 );
  +        getEventManager().fireTaskMessage( event );
       }
   
       /**
  @@ -392,18 +383,15 @@
        */
       public void warn( final String message, final Throwable throwable )
       {
  -        if( isWarnEnabled() )
  -        {
  -            final TaskEvent event =
  -                new TaskEvent( m_frame.getName(),
  -                               getName(),
  -                               m_location,
  -                               message,
  -                               throwable,
  -                               LogLevel.WARN,
  -                               0 );
  -            getEventManager().fireTaskMessage( event );
  -        }
  +        final TaskEvent event =
  +            new TaskEvent( m_frame.getName(),
  +                           getName(),
  +                           m_location,
  +                           message,
  +                           throwable,
  +                           LogLevel.WARN,
  +                           0 );
  +        getEventManager().fireTaskMessage( event );
       }
   
       /**
  @@ -434,18 +422,15 @@
        */
       public void error( final String message, final Throwable throwable )
       {
  -        if( isErrorEnabled() )
  -        {
  -            final TaskEvent event =
  -                new TaskEvent( m_frame.getName(),
  -                               getName(),
  -                               m_location,
  -                               message,
  -                               throwable,
  -                               LogLevel.ERROR,
  -                               0 );
  -            getEventManager().fireTaskMessage( event );
  -        }
  +        final TaskEvent event =
  +            new TaskEvent( m_frame.getName(),
  +                           getName(),
  +                           m_location,
  +                           message,
  +                           throwable,
  +                           LogLevel.ERROR,
  +                           0 );
  +        getEventManager().fireTaskMessage( event );
       }
   
       /**
  
  
  
  1.3       +5 -8      jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/java/ExecuteJava.java
  
  Index: ExecuteJava.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/java/ExecuteJava.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ExecuteJava.java	20 Apr 2002 12:53:38 -0000	1.2
  +++ ExecuteJava.java	24 May 2002 04:30:59 -0000	1.3
  @@ -222,14 +222,11 @@
           final String[] args = m_args.getArguments();
   
           // Log message
  -        if( context.isVerboseEnabled() )
  -        {
  -            final String debugMessage
  -                = REZ.getString( "executejava.exec-in-jvm.notice",
  -                                 m_className,
  -                                 FileUtils.formatCommandLine( args ) );
  -            context.verbose( debugMessage );
  -        }
  +        final String debugMessage =
  +            REZ.getString( "executejava.exec-in-jvm.notice",
  +                           m_className,
  +                           FileUtils.formatCommandLine( args ) );
  +        context.verbose( debugMessage );
   
           // Locate the class
           Class target;
  
  
  
  1.3       +10 -12    jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/nativelib/Execute.java
  
  Index: Execute.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/nativelib/Execute.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Execute.java	20 Apr 2002 12:53:38 -0000	1.2
  +++ Execute.java	24 May 2002 04:30:59 -0000	1.3
  @@ -28,7 +28,7 @@
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
    * @author <a href="mailto:thomas.haas@softwired-inc.com">Thomas Haas</a>
  - * @version $Revision: 1.2 $ $Date: 2002/04/20 12:53:38 $
  + * @version $Revision: 1.3 $ $Date: 2002/05/24 04:30:59 $
    */
   public class Execute
       extends Commandline
  @@ -166,17 +166,15 @@
                                    final TaskContext context )
           throws TaskException
       {
  -        if( context.isVerboseEnabled() )
  -        {
  -            final String cmdline = FileUtils.formatCommandLine( metaData.getCommand() );
  -            final String message = REZ.getString( "execute.command.notice", cmdline );
  -            context.verbose( message );
  -        }
  -        if( context.isDebugEnabled() )
  -        {
  -            final String message = REZ.getString( "execute.env-vars.notice", metaData.getEnvironment()
);
  -            context.debug( message );
  -        }
  +        final String cmdline = FileUtils.formatCommandLine( metaData.getCommand() );
  +        final String notice =
  +            REZ.getString( "execute.command.notice", cmdline );
  +        context.verbose( notice );
  +
  +        final String message =
  +            REZ.getString( "execute.env-vars.notice",
  +                           metaData.getEnvironment() );
  +        context.debug( message );
       }
   
       /**
  
  
  
  1.3       +4 -10     jakarta-ant-myrmidon/framework/src/todo/org/apache/tools/todo/taskdefs/archive/Expand.java
  
  Index: Expand.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/framework/src/todo/org/apache/tools/todo/taskdefs/archive/Expand.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Expand.java	23 May 2002 01:50:27 -0000	1.2
  +++ Expand.java	24 May 2002 04:30:59 -0000	1.3
  @@ -162,11 +162,8 @@
       protected void expandFile( final File src, final File dir )
           throws TaskException
       {
  -        if( getContext().isInfoEnabled() )
  -        {
  -            final String message = "Expanding: " + src + " into " + dir;
  -            getContext().info( message );
  -        }
  +        final String notice = "Expanding: " + src + " into " + dir;
  +        getContext().info( notice );
   
           try
           {
  @@ -178,11 +175,8 @@
               throw new TaskException( message, ioe );
           }
   
  -        if( getContext().isDebugEnabled() )
  -        {
  -            final String message = "expand complete";
  -            getContext().debug( message );
  -        }
  +        final String message = "expand complete";
  +        getContext().debug( message );
       }
   
       protected abstract void expandArchive( final File src, final File dir )
  
  
  

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