Don't create more wrappers for _behaviorsMap than necessary
-----------------------------------------------------------
Key: MYFACES-2672
URL: https://issues.apache.org/jira/browse/MYFACES-2672
Project: MyFaces Core
Issue Type: Task
Components: JSR-314
Affects Versions: 2.0.0
Reporter: Leonardo Uribe
Assignee: Leonardo Uribe
Actually we have a code on UIComponentBase.wrapBehaviorsMap() that each time it
is called it returns a Collections.unmodifiableMap(_behaviorsMap). I think we
can use a transient variable here to hold the resulting instance, and each time
it is called return it. Collections.unmodifiableMap is just a wrapper of the
real one, so we can cache it safely here. UIComponentBase.getClientBehaviors
could be called many times for the same component when it is rendered. I think
it is worth to do it.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.