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/java/org/apache/antlib/selftest ConfigurationTest.java
Date Sat, 05 Jan 2002 03:17:52 GMT
donaldp     02/01/04 19:17:52

  Modified:    proposal/myrmidon/src/java/org/apache/antlib/selftest
                        ConfigurationTest.java
  Log:
  Refactor now that resolveValue is part of TaskContext
  
  Revision  Changes    Path
  1.4       +11 -3     jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/selftest/ConfigurationTest.java
  
  Index: ConfigurationTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/selftest/ConfigurationTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ConfigurationTest.java	23 Dec 2001 06:24:52 -0000	1.3
  +++ ConfigurationTest.java	5 Jan 2002 03:17:52 -0000	1.4
  @@ -10,8 +10,8 @@
   import org.apache.avalon.framework.configuration.Configurable;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
  +import org.apache.myrmidon.api.AbstractTask;
   import org.apache.myrmidon.api.TaskException;
  -import org.apache.myrmidon.framework.AbstractContainerTask;
   
   /**
    * This is to test self interpretation of configuration.
  @@ -19,7 +19,7 @@
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
    */
   public class ConfigurationTest
  -    extends AbstractContainerTask
  +    extends AbstractTask
       implements Configurable
   {
       private String m_message;
  @@ -28,7 +28,15 @@
           throws ConfigurationException
       {
           final String message = configuration.getAttribute( "message" );
  -        final Object object = resolve( message );
  +        final Object object;
  +        try
  +        {
  +            object = resolveValue( message );
  +        }
  +        catch( final TaskException te )
  +        {
  +            throw new ConfigurationException( te.getMessage(), te );
  +        }
   
           if( object instanceof String )
           {
  
  
  

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