-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: bridge-impl-2.0.0, bridge-impl-3.0.0, bridge-impl-4.0.0
-
Fix Version/s: bridge-impl-2.1.0, bridge-impl-3.1.0, bridge-impl-4.1.0
-
Component/s: Liferay Faces Bridge Impl / Demos / Tests
-
Labels:None
HeaderRequestPhaseListener.java (in the master/6.x/5.x branch) and RenderRequestPhaseListener.java (in the 4.x/3.x/2.x branch) of liferay-faces-bridge-impl.git contain the following code:
@Override public void afterPhase(PhaseEvent phaseEvent) { FacesContext facesContext = phaseEvent.getFacesContext(); if (VIEW_PARAMETERS_ENABLED == null) { synchronized (phaseId) { if (VIEW_PARAMETERS_ENABLED == null) { PortletConfig portletConfig = RequestMapUtil.getPortletConfig(facesContext); VIEW_PARAMETERS_ENABLED = isViewParametersEnabled(portletConfig); } } } ... }
However, IDE's give a warning that synchronization is happening on on a non-final field. Changing to synchronized (this) should fix the problem.