The BridgePhaseEventImpl class should only create a FacesContext thread local singleton when a BridgeEventHandler is registered.
This bug was discovered after
FACES-3039 was fixed. Specifically, FacesBridge TCK TestPage065 (eventNoHandlerPRPPreservedTest) was failing in the liferay-faces-bridge-impl.git 2.x branch because Trinidad 1.2.13 was setting a request attribute named "org.apache.myfaces.trinidad.util.RequestStateMap" in the EVENT_PHASE of the portlet lifecycle, simply because the FacesContext was being initialized. The presence of the request attribute caused the subsequent RENDER_PHASE to throw NullPointerException in Trinidad, which in turn caused the test to fail.