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/expression/jexl JexlExpressionFactory.java
Date Mon, 30 Sep 2002 17:36:16 GMT
jstrachan    2002/09/30 10:36:16

  Modified:    jelly/src/java/org/apache/commons/jelly/expression/jexl
                        JexlExpressionFactory.java
  Log:
  Added some extra debugging code so that the toString() correctly reports the expression
text
  
  Revision  Changes    Path
  1.10      +17 -13    jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/expression/jexl/JexlExpressionFactory.java
  
  Index: JexlExpressionFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/expression/jexl/JexlExpressionFactory.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- JexlExpressionFactory.java	12 Aug 2002 10:28:51 -0000	1.9
  +++ JexlExpressionFactory.java	30 Sep 2002 17:36:16 -0000	1.10
  @@ -105,16 +105,20 @@
   
           if ( isSupportAntVariables() && isValidAntVariableName(text) ) {
               ExpressionSupport expr = new ExpressionSupport() {
  -                    public Object evaluate(JellyContext context) {
  -                        Object answer = jexlExpression.evaluate(context);
  +                public Object evaluate(JellyContext context) {
  +                    Object answer = jexlExpression.evaluate(context);
   
  -                        if ( answer == null ) {
  -                            answer = context.getVariable(text);
  -                        }
  -
  -                        return answer;
  +                    if ( answer == null ) {
  +                        answer = context.getVariable(text);
                       }
  -                };
  +
  +                    return answer;
  +                }
  +                
  +                public String toString() {
  +                    return super.toString() + "[expression:" + text + "]";
  +                }
  +            };
   
               return expr;
           }
  
  
  

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