tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: svn commit: r1503056 - in /tomcat/trunk: java/org/apache/el/ java/org/apache/el/parser/ test/org/apache/el/parser/
Date Sun, 14 Jul 2013 22:01:37 GMT
2013/7/15  <markt@apache.org>:
> Author: markt
> Date: Sun Jul 14 21:07:26 2013
> New Revision: 1503056
>
> URL: http://svn.apache.org/r1503056
> Log:
> Start to implement the lambda expression syntax. Very basic expressions work. I expect
further changes to be required for more complex expressions.
> Includes the initial unit tests for this syntax.
>
> Added:
>     tomcat/trunk/test/org/apache/el/parser/TestAstLambdaExpression.java   (with props)
> Modified:
>     tomcat/trunk/java/org/apache/el/Messages.properties
>     tomcat/trunk/java/org/apache/el/parser/AstIdentifier.java
>     tomcat/trunk/java/org/apache/el/parser/AstLambdaExpression.java
>     tomcat/trunk/java/org/apache/el/parser/AstLambdaExpressionOrInvocation.java
>

> \ No newline at end of file
> +error.identifier.notjava=The identifier [{0}] is not a valid Java identifier as required
by section 1.19 of the EL specification (Identifier ::= Java language identifier). This check
can be disabled by setting the system property org.apache.el.parser.SKIP_IDENTIFIER_CHECK
to true.
> +
> +# AstLambdaExpression
> +error.args.tooFew=Only [{0}] arguments were provided for a lambda expression that requires
at least [{1}]

Maybe rename the message key to "error.lambda.args.tooFew", to be more
specific (as the message text mentions lambda expressions)?

[...]

> Modified: tomcat/trunk/java/org/apache/el/parser/AstLambdaExpression.java
> URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/el/parser/AstLambdaExpression.java?rev=1503056&r1=1503055&r2=1503056&view=diff
> ==============================================================================
> --- tomcat/trunk/java/org/apache/el/parser/AstLambdaExpression.java (original)
> +++ tomcat/trunk/java/org/apache/el/parser/AstLambdaExpression.java Sun Jul 14 21:07:26
2013
[...]
> +
> +        // Build the argument map
> +        Map<String,Object> lambdaArgumnents = new HashMap<>();

A typo in local variable name above.

> +        for (int i = 0; i < formalParameters.children.length; i++) {
> +            lambdaArgumnents.put(formalParameters.children[i].getImage(),
> +                    paramValues[i]);
> +        }
> +
> +        ctx.enterLambdaScope(lambdaArgumnents);
> +

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message