jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sh...@apache.org
Subject cvs commit: jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/test evaluationTests.txt evaluationTestsOutput.txt
Date Wed, 13 Mar 2002 22:47:19 GMT
shawn       02/03/13 14:47:19

  Modified:    standard/src/org/apache/taglibs/standard/lang/jstl
                        AndOperator.java BinaryOperator.java
                        BinaryOperatorExpression.java OrOperator.java
               standard/src/org/apache/taglibs/standard/lang/jstl/test
                        evaluationTests.txt evaluationTestsOutput.txt
  Log:
  Fixes Jakarta Bugzilla bug #7095, reported by Hans Bergsten:
    ${'true' and false} gives true
  Submitted by: Nathan Abramson
  Reviewed by:  Shawn Bayern
  
  Revision  Changes    Path
  1.2       +11 -0     jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/AndOperator.java
  
  Index: AndOperator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/AndOperator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AndOperator.java	5 Mar 2002 14:10:43 -0000	1.1
  +++ AndOperator.java	13 Mar 2002 22:47:19 -0000	1.2
  @@ -131,4 +131,15 @@
     }
   
     //-------------------------------------
  +  /**
  +   *
  +   * Returns true if the operator expects its arguments to be coerced
  +   * to Booleans.  The And/Or operators set this to true.
  +   **/
  +  public boolean shouldCoerceToBoolean ()
  +  {
  +    return true;
  +  }
  +
  +  //-------------------------------------
   }
  
  
  
  1.2       +11 -0     jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/BinaryOperator.java
  
  Index: BinaryOperator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/BinaryOperator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- BinaryOperator.java	5 Mar 2002 14:10:43 -0000	1.1
  +++ BinaryOperator.java	13 Mar 2002 22:47:19 -0000	1.2
  @@ -109,4 +109,15 @@
     }
   
     //-------------------------------------
  +  /**
  +   *
  +   * Returns true if the operator expects its arguments to be coerced
  +   * to Booleans.  The And/Or operators set this to true.
  +   **/
  +  public boolean shouldCoerceToBoolean ()
  +  {
  +    return false;
  +  }
  +
  +  //-------------------------------------
   }
  
  
  
  1.2       +7 -0      jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/BinaryOperatorExpression.java
  
  Index: BinaryOperatorExpression.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/BinaryOperatorExpression.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- BinaryOperatorExpression.java	5 Mar 2002 14:10:43 -0000	1.1
  +++ BinaryOperatorExpression.java	13 Mar 2002 22:47:19 -0000	1.2
  @@ -150,6 +150,13 @@
       Object value = mExpression.evaluate (pContext, pLogger);
       for (int i = 0; i < mOperators.size (); i++) {
         BinaryOperator operator = (BinaryOperator) mOperators.get (i);
  +
  +      // For the And/Or operators, we need to coerce to a boolean
  +      // before testing if we shouldEvaluate
  +      if (operator.shouldCoerceToBoolean ()) {
  +	value = Coercions.coerceToBoolean (value, pLogger);
  +      }
  +
         if (operator.shouldEvaluate (value)) {
   	Expression expression = (Expression) mExpressions.get (i);
   	Object nextValue = expression.evaluate (pContext, pLogger);
  
  
  
  1.2       +11 -0     jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/OrOperator.java
  
  Index: OrOperator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/OrOperator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- OrOperator.java	5 Mar 2002 14:10:43 -0000	1.1
  +++ OrOperator.java	13 Mar 2002 22:47:19 -0000	1.2
  @@ -131,4 +131,15 @@
     }
   
     //-------------------------------------
  +  /**
  +   *
  +   * Returns true if the operator expects its arguments to be coerced
  +   * to Booleans.  The And/Or operators set this to true.
  +   **/
  +  public boolean shouldCoerceToBoolean ()
  +  {
  +    return true;
  +  }
  +
  +  //-------------------------------------
   }
  
  
  
  1.2       +11 -0     jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/test/evaluationTests.txt
  
  Index: evaluationTests.txt
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/test/evaluationTests.txt,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- evaluationTests.txt	5 Mar 2002 14:10:46 -0000	1.1
  +++ evaluationTests.txt	13 Mar 2002 22:47:19 -0000	1.2
  @@ -743,3 +743,14 @@
   java.lang.Object
   
   
  +#######################################################
  +# test String/boolean logical operators
  +
  +${'true' and false}
  +java.lang.Object
  +${'true' or true}
  +java.lang.Object
  +${false and 'true'}
  +java.lang.Object
  +${false or 'true'}
  +java.lang.Object
  
  
  
  1.2       +512 -108  jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/test/evaluationTestsOutput.txt
  
  Index: evaluationTestsOutput.txt
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/test/evaluationTestsOutput.txt,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- evaluationTestsOutput.txt	5 Mar 2002 14:10:46 -0000	1.1
  +++ evaluationTestsOutput.txt	13 Mar 2002 22:47:19 -0000	1.2
  @@ -160,24 +160,88 @@
   # val1a - defined in page scope
   Expression: ${page:val1a}
   ExpectedType: class java.lang.String
  -Evaluates to: page-scoped1
  -With type: java.lang.String
  -
  +Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.parser.ParseException:
Encountered ":" at line 1, column 7.
  +Was expecting one of:
  +    "}" ...
  +    "." ...
  +    <GT> ...
  +    <LT> ...
  +    "==" ...
  +    <LE> ...
  +    <GE> ...
  +    "!=" ...
  +    "[" ...
  +    "+" ...
  +    "-" ...
  +    "*" ...
  +    <DIVIDE> ...
  +    <MODULUS> ...
  +    "and" ...
  +    "or" ...
  +    
   Expression: ${request:val1a}
   ExpectedType: class java.lang.String
  -Evaluates to: 
  -With type: java.lang.String
  -
  +Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.parser.ParseException:
Encountered ":" at line 1, column 10.
  +Was expecting one of:
  +    "}" ...
  +    "." ...
  +    <GT> ...
  +    <LT> ...
  +    "==" ...
  +    <LE> ...
  +    <GE> ...
  +    "!=" ...
  +    "[" ...
  +    "+" ...
  +    "-" ...
  +    "*" ...
  +    <DIVIDE> ...
  +    <MODULUS> ...
  +    "and" ...
  +    "or" ...
  +    
   Expression: ${session:val1a}
   ExpectedType: class java.lang.String
  -Evaluates to: 
  -With type: java.lang.String
  -
  +Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.parser.ParseException:
Encountered ":" at line 1, column 10.
  +Was expecting one of:
  +    "}" ...
  +    "." ...
  +    <GT> ...
  +    <LT> ...
  +    "==" ...
  +    <LE> ...
  +    <GE> ...
  +    "!=" ...
  +    "[" ...
  +    "+" ...
  +    "-" ...
  +    "*" ...
  +    <DIVIDE> ...
  +    <MODULUS> ...
  +    "and" ...
  +    "or" ...
  +    
   Expression: ${app:val1a}
   ExpectedType: class java.lang.String
  -Evaluates to: 
  -With type: java.lang.String
  -
  +Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.parser.ParseException:
Encountered ":" at line 1, column 6.
  +Was expecting one of:
  +    "}" ...
  +    "." ...
  +    <GT> ...
  +    <LT> ...
  +    "==" ...
  +    <LE> ...
  +    <GE> ...
  +    "!=" ...
  +    "[" ...
  +    "+" ...
  +    "-" ...
  +    "*" ...
  +    <DIVIDE> ...
  +    <MODULUS> ...
  +    "and" ...
  +    "or" ...
  +    
   Expression: ${val1a}
   ExpectedType: class java.lang.String
   Evaluates to: page-scoped1
  @@ -187,24 +251,88 @@
   # val1b - defined in request scope
   Expression: ${page:val1b}
   ExpectedType: class java.lang.String
  -Evaluates to: 
  -With type: java.lang.String
  -
  +Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.parser.ParseException:
Encountered ":" at line 1, column 7.
  +Was expecting one of:
  +    "}" ...
  +    "." ...
  +    <GT> ...
  +    <LT> ...
  +    "==" ...
  +    <LE> ...
  +    <GE> ...
  +    "!=" ...
  +    "[" ...
  +    "+" ...
  +    "-" ...
  +    "*" ...
  +    <DIVIDE> ...
  +    <MODULUS> ...
  +    "and" ...
  +    "or" ...
  +    
   Expression: ${request:val1b}
   ExpectedType: class java.lang.String
  -Evaluates to: request-scoped1
  -With type: java.lang.String
  -
  +Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.parser.ParseException:
Encountered ":" at line 1, column 10.
  +Was expecting one of:
  +    "}" ...
  +    "." ...
  +    <GT> ...
  +    <LT> ...
  +    "==" ...
  +    <LE> ...
  +    <GE> ...
  +    "!=" ...
  +    "[" ...
  +    "+" ...
  +    "-" ...
  +    "*" ...
  +    <DIVIDE> ...
  +    <MODULUS> ...
  +    "and" ...
  +    "or" ...
  +    
   Expression: ${session:val1b}
   ExpectedType: class java.lang.String
  -Evaluates to: 
  -With type: java.lang.String
  -
  +Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.parser.ParseException:
Encountered ":" at line 1, column 10.
  +Was expecting one of:
  +    "}" ...
  +    "." ...
  +    <GT> ...
  +    <LT> ...
  +    "==" ...
  +    <LE> ...
  +    <GE> ...
  +    "!=" ...
  +    "[" ...
  +    "+" ...
  +    "-" ...
  +    "*" ...
  +    <DIVIDE> ...
  +    <MODULUS> ...
  +    "and" ...
  +    "or" ...
  +    
   Expression: ${app:val1b}
   ExpectedType: class java.lang.String
  -Evaluates to: 
  -With type: java.lang.String
  -
  +Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.parser.ParseException:
Encountered ":" at line 1, column 6.
  +Was expecting one of:
  +    "}" ...
  +    "." ...
  +    <GT> ...
  +    <LT> ...
  +    "==" ...
  +    <LE> ...
  +    <GE> ...
  +    "!=" ...
  +    "[" ...
  +    "+" ...
  +    "-" ...
  +    "*" ...
  +    <DIVIDE> ...
  +    <MODULUS> ...
  +    "and" ...
  +    "or" ...
  +    
   Expression: ${val1b}
   ExpectedType: class java.lang.String
   Evaluates to: request-scoped1
  @@ -214,24 +342,88 @@
   # val1c - defined in session scope
   Expression: ${page:val1c}
   ExpectedType: class java.lang.String
  -Evaluates to: 
  -With type: java.lang.String
  -
  +Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.parser.ParseException:
Encountered ":" at line 1, column 7.
  +Was expecting one of:
  +    "}" ...
  +    "." ...
  +    <GT> ...
  +    <LT> ...
  +    "==" ...
  +    <LE> ...
  +    <GE> ...
  +    "!=" ...
  +    "[" ...
  +    "+" ...
  +    "-" ...
  +    "*" ...
  +    <DIVIDE> ...
  +    <MODULUS> ...
  +    "and" ...
  +    "or" ...
  +    
   Expression: ${request:val1c}
   ExpectedType: class java.lang.String
  -Evaluates to: 
  -With type: java.lang.String
  -
  +Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.parser.ParseException:
Encountered ":" at line 1, column 10.
  +Was expecting one of:
  +    "}" ...
  +    "." ...
  +    <GT> ...
  +    <LT> ...
  +    "==" ...
  +    <LE> ...
  +    <GE> ...
  +    "!=" ...
  +    "[" ...
  +    "+" ...
  +    "-" ...
  +    "*" ...
  +    <DIVIDE> ...
  +    <MODULUS> ...
  +    "and" ...
  +    "or" ...
  +    
   Expression: ${session:val1c}
   ExpectedType: class java.lang.String
  -Evaluates to: session-scoped1
  -With type: java.lang.String
  -
  +Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.parser.ParseException:
Encountered ":" at line 1, column 10.
  +Was expecting one of:
  +    "}" ...
  +    "." ...
  +    <GT> ...
  +    <LT> ...
  +    "==" ...
  +    <LE> ...
  +    <GE> ...
  +    "!=" ...
  +    "[" ...
  +    "+" ...
  +    "-" ...
  +    "*" ...
  +    <DIVIDE> ...
  +    <MODULUS> ...
  +    "and" ...
  +    "or" ...
  +    
   Expression: ${app:val1c}
   ExpectedType: class java.lang.String
  -Evaluates to: 
  -With type: java.lang.String
  -
  +Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.parser.ParseException:
Encountered ":" at line 1, column 6.
  +Was expecting one of:
  +    "}" ...
  +    "." ...
  +    <GT> ...
  +    <LT> ...
  +    "==" ...
  +    <LE> ...
  +    <GE> ...
  +    "!=" ...
  +    "[" ...
  +    "+" ...
  +    "-" ...
  +    "*" ...
  +    <DIVIDE> ...
  +    <MODULUS> ...
  +    "and" ...
  +    "or" ...
  +    
   Expression: ${val1c}
   ExpectedType: class java.lang.String
   Evaluates to: session-scoped1
  @@ -241,24 +433,88 @@
   # val1d - defined in application scope
   Expression: ${page:val1d}
   ExpectedType: class java.lang.String
  -Evaluates to: 
  -With type: java.lang.String
  -
  +Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.parser.ParseException:
Encountered ":" at line 1, column 7.
  +Was expecting one of:
  +    "}" ...
  +    "." ...
  +    <GT> ...
  +    <LT> ...
  +    "==" ...
  +    <LE> ...
  +    <GE> ...
  +    "!=" ...
  +    "[" ...
  +    "+" ...
  +    "-" ...
  +    "*" ...
  +    <DIVIDE> ...
  +    <MODULUS> ...
  +    "and" ...
  +    "or" ...
  +    
   Expression: ${request:val1d}
   ExpectedType: class java.lang.String
  -Evaluates to: 
  -With type: java.lang.String
  -
  +Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.parser.ParseException:
Encountered ":" at line 1, column 10.
  +Was expecting one of:
  +    "}" ...
  +    "." ...
  +    <GT> ...
  +    <LT> ...
  +    "==" ...
  +    <LE> ...
  +    <GE> ...
  +    "!=" ...
  +    "[" ...
  +    "+" ...
  +    "-" ...
  +    "*" ...
  +    <DIVIDE> ...
  +    <MODULUS> ...
  +    "and" ...
  +    "or" ...
  +    
   Expression: ${session:val1d}
   ExpectedType: class java.lang.String
  -Evaluates to: 
  -With type: java.lang.String
  -
  +Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.parser.ParseException:
Encountered ":" at line 1, column 10.
  +Was expecting one of:
  +    "}" ...
  +    "." ...
  +    <GT> ...
  +    <LT> ...
  +    "==" ...
  +    <LE> ...
  +    <GE> ...
  +    "!=" ...
  +    "[" ...
  +    "+" ...
  +    "-" ...
  +    "*" ...
  +    <DIVIDE> ...
  +    <MODULUS> ...
  +    "and" ...
  +    "or" ...
  +    
   Expression: ${app:val1d}
   ExpectedType: class java.lang.String
  -Evaluates to: app-scoped1
  -With type: java.lang.String
  -
  +Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.parser.ParseException:
Encountered ":" at line 1, column 6.
  +Was expecting one of:
  +    "}" ...
  +    "." ...
  +    <GT> ...
  +    <LT> ...
  +    "==" ...
  +    <LE> ...
  +    <GE> ...
  +    "!=" ...
  +    "[" ...
  +    "+" ...
  +    "-" ...
  +    "*" ...
  +    <DIVIDE> ...
  +    <MODULUS> ...
  +    "and" ...
  +    "or" ...
  +    
   Expression: ${val1d}
   ExpectedType: class java.lang.String
   Evaluates to: app-scoped1
  @@ -1121,13 +1377,13 @@
       "(" ...
       "-" ...
       "not" ...
  +    "pageContext" ...
       "page" ...
       "request" ...
       "session" ...
  -    "app" ...
  -    "header" ...
  +    "application" ...
       "param" ...
  -    "paramvalues" ...
  +    "params" ...
       <IDENTIFIER> ...
       
   Expression: ${or}
  @@ -1143,13 +1399,13 @@
       "(" ...
       "-" ...
       "not" ...
  +    "pageContext" ...
       "page" ...
       "request" ...
       "session" ...
  -    "app" ...
  -    "header" ...
  +    "application" ...
       "param" ...
  -    "paramvalues" ...
  +    "params" ...
       <IDENTIFIER> ...
       
   Expression: ${not}
  @@ -1165,13 +1421,13 @@
       "(" ...
       "-" ...
       "not" ...
  +    "pageContext" ...
       "page" ...
       "request" ...
       "session" ...
  -    "app" ...
  -    "header" ...
  +    "application" ...
       "param" ...
  -    "paramvalues" ...
  +    "params" ...
       <IDENTIFIER> ...
       
   Expression: ${eq}
  @@ -1195,13 +1451,13 @@
       "(" ...
       "-" ...
       "not" ...
  +    "pageContext" ...
       "page" ...
       "request" ...
       "session" ...
  -    "app" ...
  -    "header" ...
  +    "application" ...
       "param" ...
  -    "paramvalues" ...
  +    "params" ...
       <IDENTIFIER> ...
       
   Expression: ${gt}
  @@ -1217,38 +1473,77 @@
       "(" ...
       "-" ...
       "not" ...
  +    "pageContext" ...
       "page" ...
       "request" ...
       "session" ...
  -    "app" ...
  -    "header" ...
  +    "application" ...
       "param" ...
  -    "paramvalues" ...
  +    "params" ...
       <IDENTIFIER> ...
       
   Expression: ${le}
   ExpectedType: class java.lang.Object
  -Evaluates to: null
  -
  +Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.parser.ParseException:
Encountered "le" at line 1, column 3.
  +Was expecting one of:
  +    <INTEGER_LITERAL> ...
  +    <FLOATING_POINT_LITERAL> ...
  +    <STRING_LITERAL> ...
  +    "true" ...
  +    "false" ...
  +    "null" ...
  +    "(" ...
  +    "-" ...
  +    "not" ...
  +    "pageContext" ...
  +    "page" ...
  +    "request" ...
  +    "session" ...
  +    "application" ...
  +    "param" ...
  +    "params" ...
  +    <IDENTIFIER> ...
  +    
   Expression: ${ge}
   ExpectedType: class java.lang.Object
  -Evaluates to: null
  -
  +Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.parser.ParseException:
Encountered "ge" at line 1, column 3.
  +Was expecting one of:
  +    <INTEGER_LITERAL> ...
  +    <FLOATING_POINT_LITERAL> ...
  +    <STRING_LITERAL> ...
  +    "true" ...
  +    "false" ...
  +    "null" ...
  +    "(" ...
  +    "-" ...
  +    "not" ...
  +    "pageContext" ...
  +    "page" ...
  +    "request" ...
  +    "session" ...
  +    "application" ...
  +    "param" ...
  +    "params" ...
  +    <IDENTIFIER> ...
  +    
   Expression: ${instanceof}
   ExpectedType: class java.lang.Object
   Evaluates to: null
   
   Expression: ${page}
   ExpectedType: class java.lang.Object
  -Evaluates to: null
  +Evaluates to: org.apache.taglibs.standard.lang.jstl.ImplicitObjects$1@506411
  +With type: org.apache.taglibs.standard.lang.jstl.ImplicitObjects$1
   
   Expression: ${request}
   ExpectedType: class java.lang.Object
  -Evaluates to: null
  +Evaluates to: org.apache.taglibs.standard.lang.jstl.ImplicitObjects$2@2152e6
  +With type: org.apache.taglibs.standard.lang.jstl.ImplicitObjects$2
   
   Expression: ${session}
   ExpectedType: class java.lang.Object
  -Evaluates to: null
  +Evaluates to: org.apache.taglibs.standard.lang.jstl.ImplicitObjects$3@60be38
  +With type: org.apache.taglibs.standard.lang.jstl.ImplicitObjects$3
   
   Expression: ${app}
   ExpectedType: class java.lang.Object
  @@ -1278,13 +1573,13 @@
   Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.parser.ParseException:
Encountered "and" at line 1, column 10.
   Was expecting one of:
       <STRING_LITERAL> ...
  +    "pageContext" ...
       "page" ...
       "request" ...
       "session" ...
  -    "app" ...
  -    "header" ...
  +    "application" ...
       "param" ...
  -    "paramvalues" ...
  +    "params" ...
       <IDENTIFIER> ...
       
   Expression: ${bean1a.or}
  @@ -1292,13 +1587,13 @@
   Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.parser.ParseException:
Encountered "or" at line 1, column 10.
   Was expecting one of:
       <STRING_LITERAL> ...
  +    "pageContext" ...
       "page" ...
       "request" ...
       "session" ...
  -    "app" ...
  -    "header" ...
  +    "application" ...
       "param" ...
  -    "paramvalues" ...
  +    "params" ...
       <IDENTIFIER> ...
       
   Expression: ${bean1a.not}
  @@ -1306,13 +1601,13 @@
   Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.parser.ParseException:
Encountered "not" at line 1, column 10.
   Was expecting one of:
       <STRING_LITERAL> ...
  +    "pageContext" ...
       "page" ...
       "request" ...
       "session" ...
  -    "app" ...
  -    "header" ...
  +    "application" ...
       "param" ...
  -    "paramvalues" ...
  +    "params" ...
       <IDENTIFIER> ...
       
   Expression: ${bean1a.eq}
  @@ -1326,13 +1621,13 @@
   Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.parser.ParseException:
Encountered "lt" at line 1, column 10.
   Was expecting one of:
       <STRING_LITERAL> ...
  +    "pageContext" ...
       "page" ...
       "request" ...
       "session" ...
  -    "app" ...
  -    "header" ...
  +    "application" ...
       "param" ...
  -    "paramvalues" ...
  +    "params" ...
       <IDENTIFIER> ...
       
   Expression: ${bean1a.gt}
  @@ -1340,21 +1635,43 @@
   Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.parser.ParseException:
Encountered "gt" at line 1, column 10.
   Was expecting one of:
       <STRING_LITERAL> ...
  +    "pageContext" ...
       "page" ...
       "request" ...
       "session" ...
  -    "app" ...
  -    "header" ...
  +    "application" ...
       "param" ...
  -    "paramvalues" ...
  +    "params" ...
       <IDENTIFIER> ...
       
   Expression: ${bean1a.le}
   ExpectedType: class java.lang.Object
  -Causes an error: Unable to find a value for "le" in object of class "org.apache.taglibs.standard.lang.jstl.test.Bean1"
using operator "."
  +Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.parser.ParseException:
Encountered "le" at line 1, column 10.
  +Was expecting one of:
  +    <STRING_LITERAL> ...
  +    "pageContext" ...
  +    "page" ...
  +    "request" ...
  +    "session" ...
  +    "application" ...
  +    "param" ...
  +    "params" ...
  +    <IDENTIFIER> ...
  +    
   Expression: ${bean1a.ge}
   ExpectedType: class java.lang.Object
  -Causes an error: Unable to find a value for "ge" in object of class "org.apache.taglibs.standard.lang.jstl.test.Bean1"
using operator "."
  +Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.parser.ParseException:
Encountered "ge" at line 1, column 10.
  +Was expecting one of:
  +    <STRING_LITERAL> ...
  +    "pageContext" ...
  +    "page" ...
  +    "request" ...
  +    "session" ...
  +    "application" ...
  +    "param" ...
  +    "params" ...
  +    <IDENTIFIER> ...
  +    
   Expression: ${bean1a.instanceof}
   ExpectedType: class java.lang.Object
   Causes an error: Unable to find a value for "instanceof" in object of class "org.apache.taglibs.standard.lang.jstl.test.Bean1"
using operator "."
  @@ -1375,13 +1692,13 @@
   Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.parser.ParseException:
Encountered "true" at line 1, column 10.
   Was expecting one of:
       <STRING_LITERAL> ...
  +    "pageContext" ...
       "page" ...
       "request" ...
       "session" ...
  -    "app" ...
  -    "header" ...
  +    "application" ...
       "param" ...
  -    "paramvalues" ...
  +    "params" ...
       <IDENTIFIER> ...
       
   Expression: ${bean1a.false}
  @@ -1389,13 +1706,13 @@
   Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.parser.ParseException:
Encountered "false" at line 1, column 10.
   Was expecting one of:
       <STRING_LITERAL> ...
  +    "pageContext" ...
       "page" ...
       "request" ...
       "session" ...
  -    "app" ...
  -    "header" ...
  +    "application" ...
       "param" ...
  -    "paramvalues" ...
  +    "params" ...
       <IDENTIFIER> ...
       
   Expression: ${bean1a.null}
  @@ -1403,13 +1720,13 @@
   Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.parser.ParseException:
Encountered "null" at line 1, column 10.
   Was expecting one of:
       <STRING_LITERAL> ...
  +    "pageContext" ...
       "page" ...
       "request" ...
       "session" ...
  -    "app" ...
  -    "header" ...
  +    "application" ...
       "param" ...
  -    "paramvalues" ...
  +    "params" ...
       <IDENTIFIER> ...
       
   
  @@ -1793,24 +2110,88 @@
   
   Expression: ${ 4 lte 3}
   ExpectedType: class java.lang.Object
  -Evaluates to: false
  -With type: java.lang.Boolean
  -
  +Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.parser.ParseException:
Encountered "lte" at line 1, column 6.
  +Was expecting one of:
  +    "}" ...
  +    "." ...
  +    <GT> ...
  +    <LT> ...
  +    "==" ...
  +    <LE> ...
  +    <GE> ...
  +    "!=" ...
  +    "[" ...
  +    "+" ...
  +    "-" ...
  +    "*" ...
  +    <DIVIDE> ...
  +    <MODULUS> ...
  +    "and" ...
  +    "or" ...
  +    
   Expression: ${ 4 gte 3}
   ExpectedType: class java.lang.Object
  -Evaluates to: true
  -With type: java.lang.Boolean
  -
  +Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.parser.ParseException:
Encountered "gte" at line 1, column 6.
  +Was expecting one of:
  +    "}" ...
  +    "." ...
  +    <GT> ...
  +    <LT> ...
  +    "==" ...
  +    <LE> ...
  +    <GE> ...
  +    "!=" ...
  +    "[" ...
  +    "+" ...
  +    "-" ...
  +    "*" ...
  +    <DIVIDE> ...
  +    <MODULUS> ...
  +    "and" ...
  +    "or" ...
  +    
   Expression: ${ 4 lte 4}
   ExpectedType: class java.lang.Object
  -Evaluates to: true
  -With type: java.lang.Boolean
  -
  +Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.parser.ParseException:
Encountered "lte" at line 1, column 6.
  +Was expecting one of:
  +    "}" ...
  +    "." ...
  +    <GT> ...
  +    <LT> ...
  +    "==" ...
  +    <LE> ...
  +    <GE> ...
  +    "!=" ...
  +    "[" ...
  +    "+" ...
  +    "-" ...
  +    "*" ...
  +    <DIVIDE> ...
  +    <MODULUS> ...
  +    "and" ...
  +    "or" ...
  +    
   Expression: ${ 4 gte 4}
   ExpectedType: class java.lang.Object
  -Evaluates to: true
  -With type: java.lang.Boolean
  -
  +Causes an error: Unable to parse the expression: org.apache.taglibs.standard.lang.jstl.parser.ParseException:
Encountered "gte" at line 1, column 6.
  +Was expecting one of:
  +    "}" ...
  +    "." ...
  +    <GT> ...
  +    <LT> ...
  +    "==" ...
  +    <LE> ...
  +    <GE> ...
  +    "!=" ...
  +    "[" ...
  +    "+" ...
  +    "-" ...
  +    "*" ...
  +    <DIVIDE> ...
  +    <MODULUS> ...
  +    "and" ...
  +    "or" ...
  +    
   
   #######################################################
   # test expressions on the left side of a value suffix
  @@ -1826,4 +2207,27 @@
   With type: java.lang.String
   
   
  +
  +#######################################################
  +# test String/boolean logical operators
  +
  +Expression: ${'true' and false}
  +ExpectedType: class java.lang.Object
  +Evaluates to: false
  +With type: java.lang.Boolean
  +
  +Expression: ${'true' or true}
  +ExpectedType: class java.lang.Object
  +Evaluates to: true
  +With type: java.lang.Boolean
  +
  +Expression: ${false and 'true'}
  +ExpectedType: class java.lang.Object
  +Evaluates to: false
  +With type: java.lang.Boolean
  +
  +Expression: ${false or 'true'}
  +ExpectedType: class java.lang.Object
  +Evaluates to: true
  +With type: java.lang.Boolean
   
  
  
  

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


Mime
View raw message