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/myrmidon/components/workspace DefaultTaskContext.java
Date Tue, 12 Mar 2002 11:10:52 GMT
donaldp     02/03/12 03:10:52

  Modified:    proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace
                        DefaultTaskContext.java
  Log:
  Lazy access of resolver as not in ServiceManager at construction
  
  Revision  Changes    Path
  1.26      +7 -3      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/DefaultTaskContext.java
  
  Index: DefaultTaskContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/DefaultTaskContext.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- DefaultTaskContext.java	12 Mar 2002 10:20:21 -0000	1.25
  +++ DefaultTaskContext.java	12 Mar 2002 11:10:52 -0000	1.26
  @@ -27,7 +27,7 @@
    * Default implementation of TaskContext.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.25 $ $Date: 2002/03/12 10:20:21 $
  + * @version $Revision: 1.26 $ $Date: 2002/03/12 11:10:52 $
    */
   public class DefaultTaskContext
       implements TaskContext, Context
  @@ -47,7 +47,7 @@
       private final TaskContext m_parent;
       private final ServiceManager m_serviceManager;
       private final Logger m_logger;
  -    private final PropertyResolver m_propertyResolver;
  +    private PropertyResolver m_propertyResolver;
   
       /**
        * Constructor that takes both parent context and a service directory.
  @@ -60,7 +60,7 @@
           m_parent = parent;
           m_serviceManager = serviceManager;
           m_logger = logger;
  -        m_propertyResolver = (PropertyResolver)getService( PropertyResolver.class );
  +        //m_propertyResolver = (PropertyResolver)getService( PropertyResolver.class );
       }
   
       /**
  @@ -150,6 +150,10 @@
       {
           try
           {
  +            if( null == m_propertyResolver )
  +            {
  +                m_propertyResolver = (PropertyResolver)getService( PropertyResolver.class
);
  +            }
               final Object object =
                   m_propertyResolver.resolveProperties( value, this );
               if( null == object )
  
  
  

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