-
Notifications
You must be signed in to change notification settings - Fork 112
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
[Scope]Map#containsKey() doesn't check if key is present but only if value is non-null #5530
Comments
The performance problem is primarily caused by the Servlet specification It should return a In this way the Faces' Another solution is simply to add the relevant methods HttpServletRequest HttpSession [...] under the hood the Servlet Container In the meantime the Faces remediation plan could be:
And for the other scopes cache the |
After a second read of this Tomcat ticket https://bz.apache.org/bugzilla/show_bug.cgi?id=69444 Mark Thomas said:
if this is a standard behaviour, the actual implementation could be safe enough... ?
|
Indeed. Thanks! |
And this is incorrect.
Observed in ApplicaitonMap, InitParameterMap, RequestHeaderMap, RequestHeaderValuesMap, RequestParameterMap, RequestParameterValuesMap and SessionMap.
E.g. RequestMap:
should basically have been
The only scope Map which has containsKey() correctly implemented is ELFlash.
There's however a potential performance penalty with this change in case the map has a thousand of attributes or so and thus this needs to be carefully evaluated.
The text was updated successfully, but these errors were encountered: