Re: Issue 2746

From: Manfred Riem <>
Date: Thu, 10 Oct 2013 14:28:28 -0500

Last call!

If there a no objections by the end of this week I will go ahead and
apply this change next week.

See for the changebundle.


On 9/16/2013 8:32 AM, Manfred Riem wrote:
> Hi Ed,
> I am storing it in the applicationMap only when the FacesContext is
> available.
> If not I am always going through the process of building up the map.
> That way it can work also when someone decides to do something really
> tricky.
> On the note of making it available I think it would be prudent to not
> go through
> this until the first time this component actually is needed.
> Manfred
> On 9/13/2013 5:09 PM, Edward Burns wrote:
>>>>>>> On Fri, 13 Sep 2013 12:09:42 -0500, Manfred Riem
>>>>>>> <> said:
>> MR> Hi all,
>> MR> Because of issue #2746 I propose an implementation change in
>> UIComponentBase
>> MR> that makes the static descriptors field a non-static field.
>> MR> See the JIRA issue for the proposed implementation.
>> MR> Let me know your thoughts!
>> In populateDescriptorsMapIfNecessary() you are making the private
>> descriptors map no longer static. Instead, you are storing it in the
>> application scope. This is fine in and of itself, but wouldn't you need
>> to do some sort of two-phase process to initially get access to the map
>> in that method? Without such protection, your proposed solution seems
>> open to race conditions.
>> Because the map is now a ConcurrentHashMap, reads and writes to the map
>> should be fine. I suggest pre-allocating the map in that place in our
>> code where we do a bunch of stuff on the PostConstructApplicationEvent.
>> I think it's in WebConfiguration. This eliminates the possibility of
>> a race condition in the creation of the COMPONENT_DESCRIPTORS_MAP.
>> Ed