Skip to content
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

Create TypeLiteral Constants #1824

Closed
volosied opened this issue Jul 7, 2023 · 1 comment
Closed

Create TypeLiteral Constants #1824

volosied opened this issue Jul 7, 2023 · 1 comment
Labels
EE12 mojarra-implemented API issue implemented by Mojarra myfaces-implemented API issue implemented by MyFaces
Milestone

Comments

@volosied
Copy link
Contributor

volosied commented Jul 7, 2023

Originally mentioned by Arjan in the following post:


Map<String, String> headerMap = CDI.current().select(new TypeLiteral<Map<String, String>>() {}, HeaderMap.Literal.INSTANCE).get();

In a way for usability this is quite a step back, but a logical consequence of not allowing raw maps indeed. Maybe we can introduce something like a HeaderMap.TYPE to represent new TypeLiteral<Map<String, String>>() {} for Faces.Next.

Originally posted by @arjantijms in #1723 (comment)


A previous TCK challenge removed the ability to inject into raw Map types (as it was not spec defined), so TypeLiterals (introduced in 4.0) needed parameters to be injected properly into the parametrized types. It would be nice to have new constants to avoid the verbose code above.

@volosied
Copy link
Contributor Author

volosied commented Jul 7, 2023

@arjantijms @BalusC Could this be added to the 5.0 plan?

@BalusC BalusC added this to the 5.0 milestone Jul 23, 2023
@tandraschko tandraschko added the myfaces-implemented API issue implemented by MyFaces label Sep 3, 2024
@BalusC BalusC added the mojarra-implemented API issue implemented by Mojarra label Sep 5, 2024
@BalusC BalusC closed this as completed Sep 5, 2024
@arjantijms arjantijms added the EE12 label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EE12 mojarra-implemented API issue implemented by Mojarra myfaces-implemented API issue implemented by MyFaces
Projects
None yet
Development

No branches or pull requests

4 participants