-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not possible to transform String to enumeration value in special case #90
Comments
Hi!
|
Hi, The question is whether it should work correctly or not, as it's quite a big corner case and I couldn't find anybody with the same issue. Also, when I mean that it is not an enum I mean that if you run |
Using |
In the "context", we know the "actor2" is a "com.juel.App$Actor", but when evaluate "${actor2 == 'HOMER'}", the eq function treat "actor2" as a Object, o1.getClass will get "com.juel.App$Actor$1". There is no way JUEL know how to convert 'HOMER' to a "com.juel.App$Actor$1". So special RALPH is indeed different from HOMER and BART. And I don't think this is a bug. |
Implemented spec of JUEL is JSP 2.2 == EL 2.1: Chapter 1.8.2 2 says:
Next spec EL 3.0: The JSR-000341 Expression Language 3.0 Final Release specification from 2013 1 states in chapter 1.9.2:
From my understanding this officially means since JUEL wants to implement EL2.1, it is a bug. |
This small class reproduces an issue we had with JUEL and OpenJDK 1.7. The interesting thing of this case is that RALPH is internally a subclass of Actor, so it is not an enum and it is not possible to transform into a member of the enumeration and according to the EL specification it should work.
Output:
The text was updated successfully, but these errors were encountered: