commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject cvs commit: jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/ant AntTag.java
Date Mon, 30 Sep 2002 08:06:59 GMT
jstrachan    2002/09/30 01:06:59

  Modified:    jelly/src/java/org/apache/commons/jelly/expression
                        Expression.java ExpressionSupport.java
               jelly/src/java/org/apache/commons/jelly/tags/ant AntTag.java
  Log:
  Applied patch suggested by Martin Cooper that evaluateRecurse() was a much better name than
evaluateAsValue() which was pretty crappy. (Sometimes I have a mental block of what to call
things and this was a great example of that mental block! :-)
  Thanks for the suggestion Martin.
  
  Revision  Changes    Path
  1.6       +6 -6      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/expression/Expression.java
  
  Index: Expression.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/expression/Expression.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Expression.java	20 Sep 2002 13:15:16 -0000	1.5
  +++ Expression.java	30 Sep 2002 08:06:59 -0000	1.6
  @@ -113,5 +113,5 @@
        * So using this method, nested expressions can be evaluated to the
        * actual underlying value object.
        */
  -    public Object evaluateAsValue(JellyContext context);
  +    public Object evaluateRecurse(JellyContext context);
   }
  
  
  
  1.8       +10 -10    jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/expression/ExpressionSupport.java
  
  Index: ExpressionSupport.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/expression/ExpressionSupport.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ExpressionSupport.java	20 Sep 2002 13:15:16 -0000	1.7
  +++ ExpressionSupport.java	30 Sep 2002 08:06:59 -0000	1.8
  @@ -88,7 +88,7 @@
   
       // inherit javadoc from interface
       public String evaluateAsString(JellyContext context) {
  -        Object value = evaluateAsValue(context);
  +        Object value = evaluateRecurse(context);
           // sometimes when Jelly is used inside Maven the value
           // of an expression can actually be an expression.
           // e.g. ${foo.bar} can lookup "foo.bar" in a Maven context
  @@ -102,18 +102,18 @@
   
   
       // inherit javadoc from interface
  -    public Object evaluateAsValue(JellyContext context) {
  +    public Object evaluateRecurse(JellyContext context) {
           Object value = evaluate(context);
           if (value instanceof Expression) {
               Expression expression = (Expression) value;
  -            return expression.evaluateAsValue(context);
  +            return expression.evaluateRecurse(context);
           }
           return value;
       }
       
       // inherit javadoc from interface
       public boolean evaluateAsBoolean(JellyContext context) {
  -        Object value = evaluateAsValue(context);
  +        Object value = evaluateRecurse(context);
           if ( value instanceof Boolean ) {
               Boolean b = (Boolean) value;
               return b.booleanValue();
  @@ -143,7 +143,7 @@
   
       // inherit javadoc from interface
       public Iterator evaluateAsIterator(JellyContext context) {
  -        Object value = evaluateAsValue(context);
  +        Object value = evaluateRecurse(context);
           if ( value == null ) {
               return EMPTY_ITERATOR;
           }
  
  
  
  1.13      +1 -1      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/ant/AntTag.java
  
  Index: AntTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/ant/AntTag.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- AntTag.java	23 Sep 2002 12:34:38 -0000	1.12
  +++ AntTag.java	30 Sep 2002 08:06:59 -0000	1.13
  @@ -334,7 +334,7 @@
           else {
               if ( value instanceof Expression )
               {
  -                super.setAttribute( name, ((Expression) value).evaluateAsValue(context)
);
  +                super.setAttribute( name, ((Expression) value).evaluateRecurse(context)
);
               }
               else
               {
  
  
  

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


Mime
View raw message