commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdon...@apache.org
Subject cvs commit: jakarta-commons/digester/src/java/org/apache/commons/digester/substitution VariableSubstitutor.java
Date Wed, 03 Dec 2003 23:21:52 GMT
rdonkin     2003/12/03 15:21:52

  Modified:    digester/src/java/org/apache/commons/digester/substitution
                        VariableSubstitutor.java
  Log:
  Changed from lazy construction to construction when the substitutor is created. Suggested
by Simon Kitching.
  
  Revision  Changes    Path
  1.2       +5 -7      jakarta-commons/digester/src/java/org/apache/commons/digester/substitution/VariableSubstitutor.java
  
  Index: VariableSubstitutor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/substitution/VariableSubstitutor.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- VariableSubstitutor.java	2 Dec 2003 23:21:39 -0000	1.1
  +++ VariableSubstitutor.java	3 Dec 2003 23:21:52 -0000	1.2
  @@ -116,6 +116,7 @@
       public VariableSubstitutor(VariableExpander attributesExpander, VariableExpander bodyTextExpander)
{
           this.attributesExpander = attributesExpander;
           this.bodyTextExpander = bodyTextExpander;
  +        variableAttributes = new VariableAttributes();
       }    
   
       /**
  @@ -125,9 +126,6 @@
       public Attributes substitute(Attributes attributes) {
           Attributes results = attributes;
           if (attributesExpander != null) {
  -            if (variableAttributes == null) {
  -                variableAttributes = new VariableAttributes();
  -            }
               variableAttributes.init(attributes, attributesExpander);
               results = variableAttributes;
           }
  
  
  

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


Mime
View raw message