-
Notifications
You must be signed in to change notification settings - Fork 56
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
Remove injection and lookups for raw maps according to challenge #1710 #1723
Remove injection and lookups for raw maps according to challenge #1710 #1723
Conversation
Signed-off-by: Arjan Tijms <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR should also remove/disable the corresponding tests:
- faces23 - Spec1323IT (ApplicationMap)
- faces23 - Spec1335IT (ViewMap)
- faces23 - Spec1345IT (SessionMap)
- faces23 - Spec1353IT (RequestCookie)
- faces40 - Spec1582ApplicationMapIT
- faces40 - Spec1582RequestCookieMapIT
- faces40 - Spec1582ViewMapIT
Signed-off-by: Arjan Tijms <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would appear that I was hasty with my initial review. Talked this over with some of our devs and the remaining faces40/cdi tests would need an update, too.
In the beans, lines like:
Map<String, String> headerMap = CDI.current().select(Map.class, HeaderMap.Literal.INSTANCE).get();
would need to be updated to:
Map<String, String> headerMap = CDI.current().select(new TypeLiteral<Map<String, String>>() {}, HeaderMap.Literal.INSTANCE).get();
in order to correctly test what's being attempted here.
It's also worth pointing out that the ApplicationMap test (both faces23 and faces40) are verifying behavior using the Mojarra-specific property jakarta.faces.BEANS_VALIDATION_AVAILABLE, which won't work for us. Can that be fixed here, too? Alternatively, I could add it to the challenge for implementation-specific grievances (#1703). Or if it's preferred, I can open a new challenge for additional implementation-specific grievances. |
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 |
Additionally set application map attribute explicitly. Signed-off-by: Arjan Tijms <[email protected]>
|
||
return Boolean.toString(applicationMap.containsKey("jakarta.faces.BEANS_VALIDATION_AVAILABLE")); | ||
return Boolean.toString(applicationMap.containsKey("barAttribute")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This same change needs to be made to the faces23/cdi version of this test, too.
Fixes #1710
Signed-off-by: Arjan Tijms [email protected]