From b5072a8c35da484e6b629acbe636b046784593b2 Mon Sep 17 00:00:00 2001 From: Peter Donald Date: Tue, 12 Mar 2002 11:10:52 +0000 Subject: [PATCH] Lazy access of resolver as not in ServiceManager at construction git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271831 13f79535-47bb-0310-9956-ffa450edef68 --- .../myrmidon/components/workspace/DefaultTaskContext.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/DefaultTaskContext.java b/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/DefaultTaskContext.java index 4edbeb512..738c80b25 100644 --- a/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/DefaultTaskContext.java +++ b/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/DefaultTaskContext.java @@ -47,7 +47,7 @@ public class DefaultTaskContext 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 @@ public class DefaultTaskContext 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 @@ public class DefaultTaskContext { try { + if( null == m_propertyResolver ) + { + m_propertyResolver = (PropertyResolver)getService( PropertyResolver.class ); + } final Object object = m_propertyResolver.resolveProperties( value, this ); if( null == object )