Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Bug Report: java.lang.String cannot be converted to java.lang.Long in JSF EL Expression #21

Open
kamilkrzywanski opened this issue Dec 2, 2024 · 0 comments

Comments

@kamilkrzywanski
Copy link

When using a <c:if> tag with a JSF Expression Language (EL) expression that performs a numeric operation, such as:

<c:if test="#{testView.string == 56 * 1}">
</c:if>

The following error is thrown:
Cannot convert [Welcome to PrimeFaces!!!] of type [class java.lang.String] to [class java.lang.Long]
Here, testView.string is a String property (Welcome to PrimeFaces!!!), and the comparison with a numeric expression 56 * 1 leads to a type mismatch.

Probably regression commit:
704050f#diff-2ff982307127640577acb628d13e962081390439c5f3a62d694d09a42a1dfdd2L116

Example project with this bug:
primefaces-test-cast-to-long.zip

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant