hivemind-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hls...@apache.org
Subject cvs commit: jakarta-hivemind/framework/src/java/org/apache/hivemind/service/impl BuilderPropertyFacet.java BuilderFactoryLogic.java
Date Tue, 21 Dec 2004 23:27:04 GMT
hlship      2004/12/21 15:27:04

  Modified:    framework/src/java/org/apache/hivemind/service/impl
                        BuilderPropertyFacet.java BuilderFactoryLogic.java
  Log:
  Remove some property caching code that prevented constructor injection of configuration
elements as a Map from working.
  
  Revision  Changes    Path
  1.8       +7 -14     jakarta-hivemind/framework/src/java/org/apache/hivemind/service/impl/BuilderPropertyFacet.java
  
  Index: BuilderPropertyFacet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-hivemind/framework/src/java/org/apache/hivemind/service/impl/BuilderPropertyFacet.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- BuilderPropertyFacet.java	20 Dec 2004 15:25:22 -0000	1.7
  +++ BuilderPropertyFacet.java	21 Dec 2004 23:27:04 -0000	1.8
  @@ -31,24 +31,17 @@
   
       private String _literalValue;
   
  -    private Object _translatedValue;
  -
       public Object getFacetValue(ServiceImplementationFactoryParameters factoryParameters,
               Class targetType)
       {
  -        if (_translatedValue == null)
  -        {
  -            Translator translator = factoryParameters.getInvokingModule().getTranslator(
  -                    _translatorName);
  -
  -            _translatedValue = translator.translate(
  -                    factoryParameters.getInvokingModule(),
  -                    targetType,
  -                    _literalValue,
  -                    getLocation());
  -        }
  +        Translator translator = factoryParameters.getInvokingModule()
  +                .getTranslator(_translatorName);
   
  -        return _translatedValue;
  +        return translator.translate(
  +                factoryParameters.getInvokingModule(),
  +                targetType,
  +                _literalValue,
  +                getLocation());
       }
   
       public boolean isAssignableToType(ServiceImplementationFactoryParameters factoryParameters,
  
  
  
  1.11      +0 -25     jakarta-hivemind/framework/src/java/org/apache/hivemind/service/impl/BuilderFactoryLogic.java
  
  Index: BuilderFactoryLogic.java
  ===================================================================
  RCS file: /home/cvs/jakarta-hivemind/framework/src/java/org/apache/hivemind/service/impl/BuilderFactoryLogic.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- BuilderFactoryLogic.java	20 Dec 2004 15:25:22 -0000	1.10
  +++ BuilderFactoryLogic.java	21 Dec 2004 23:27:04 -0000	1.11
  @@ -114,31 +114,6 @@
           return instantiateExplicitConstructorInstance(serviceClass, parameters);
       }
   
  -    private Object[] buildConstructorParameters(List parameters)
  -    {
  -        int count = parameters.size();
  -
  -        Object[] result = new Object[count];
  -
  -        for (int i = 0; i < count; i++)
  -        {
  -            BuilderFacet facet = (BuilderFacet) parameters.get(i);
  -
  -            try
  -            {
  -                result[i] = facet.getFacetValue(_factoryParameters, Object.class);
  -
  -                HiveMind.setLocation(result[i], HiveMind.getLocation(facet));
  -            }
  -            catch (Exception ex)
  -            {
  -                error(ex.getMessage(), facet.getLocation(), ex);
  -            }
  -        }
  -
  -        return result;
  -    }
  -
       private Object instantiateExplicitConstructorInstance(Class serviceClass, List builderParameters)
       {
           int numberOfParams = builderParameters.size();
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-cvs-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-cvs-help@jakarta.apache.org


Mime
View raw message