Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am looking for list of differences between EL 2.1 and 2.2.

I know one difference between EL 2.1 and 2.2 is ability to pass method parameters in 2.2. Are there any other differences?

Is there any feature comparison chart available for the differences? I have been searching for a few days and haven't been able to locate it so far.

Thank you

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
276 views
Welcome To Ask or Share your Answers For Others

1 Answer

The answer is in the EL 2.2. specification document. Here's an extract of relevance:

A.1 Changes between Maintenance 1 and Maintenance Release 2

The main change in this release is the addition of method invokations with parameters in the EL, such as #{trader.buy("JAVA")}.

  • Added one method in javax.el.ELResolver:
    • Object invoke(ELContext context, Object base, Object method, Class<?>[] paramTypes, Object[] params).

  • Added one method in javax.el.BeanELResolver:
    • Object invoke(ELContext context, Object base, Object method, Class<?>[] paramTypes, Object[] params).

  • Added one method in javax.el.CompositeELResolver:
    • Object invoke(ELContext context, Object base, Object method, Class<?>[] paramTypes, Object[] params).

  • Section 1.1.1. Added to the first paragraph:

    Simlarly, . operator can also be used to invoke methods, when the method name is known, but the [] operator can be used to invoke methods dynamically.

  • Section 1.2.1. Change the last part of the last paragraph from

    Upon evaluation, the EL API verifies that the method conforms to the expected signature provided at parse time. There is therefore no coercion performed.

    to

    Upon evaluation, if the expected signature is provided at parse time, the EL API verifies that the method conforms to the expected signature, and there is therefore no coercion performed. If the expected signature is not provided at parse time, then at evaluation, the method is identified with the information of the parameters in the expression and the parameters are coerced to the respective formal types.

  • Section 1.6. Added syntax for method invocation with parameters. The steps for evaluation of the expression was modified to handle the method invocations with parameters.

  • Section 1.19. Production of ValueSuffix includes the optional parameters.

No other changes are mentioned. So, it's indeed just only the method invocation capability.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...