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, 12 Aug 2002 10:28:52 GMT
jstrachan    2002/08/12 03:28:51

  Modified:    jelly/src/java/org/apache/commons/jelly/expression/jexl
                        JexlExpressionFactory.java
  Log:
  Temporarily backed out some changes that depend on newer versions of Jexl. 
  Once Jexl handles sub-expression resolvers, so that ${a.b.c == 'foo'} can work with Ant-style
naming of properties, we'll swizzle this code back again.
  
  Revision  Changes    Path
  1.9       +19 -6     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.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- JexlExpressionFactory.java	18 Jun 2002 18:36:42 -0000	1.8
  +++ JexlExpressionFactory.java	12 Aug 2002 10:28:51 -0000	1.9
  @@ -67,6 +67,8 @@
   import org.apache.commons.jelly.expression.ExpressionSupport;
   import org.apache.commons.jelly.expression.ExpressionFactory;
   
  +//import org.apache.commons.jexl.resolver.FlatResolver;
  +
   /** 
    * Represents a factory of <a href="http://jakarta.apache.org/commons/jexl.html">Jexl</a>

    * expression which fully supports the Expression Language in JSTL and JSP.
  @@ -85,11 +87,22 @@
       // ExpressionFactory interface
       //------------------------------------------------------------------------- 
       public Expression createExpression(final String text) throws Exception {
  +/*        
  +        
  +        org.apache.commons.jexl.Expression expr = 
  +            org.apache.commons.jexl.ExpressionFactory.createExpression(text);
  +            
  +        if ( isSupportAntVariables() ) {
  +            expr.addPostResolver(new FlatResolver());
  +        }
  +        
  +        return new JexlExpression( expr );
  +*/        
   
           final Expression jexlExpression = new JexlExpression(
               org.apache.commons.jexl.ExpressionFactory.createExpression(text)
               );
  -        
  +
           if ( isSupportAntVariables() && isValidAntVariableName(text) ) {
               ExpressionSupport expr = new ExpressionSupport() {
                       public Object evaluate(JellyContext context) {
  
  
  

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