You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by js...@apache.org on 2002/09/30 19:36:16 UTC
cvs commit: jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/expression/jexl JexlExpressionFactory.java
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: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>