Create TypeLiteral Constants #1824
Labels
EE12
mojarra-implemented
API issue implemented by Mojarra
myfaces-implemented
API issue implemented by MyFaces
Milestone
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 representnew 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.
The text was updated successfully, but these errors were encountered: