private void _clearExecuteFlashMap ( FacesContext facesContext ) { Map < String , Object > map = _getExecuteFlashMap ( facesContext ) ; if ( ! map . isEmpty ( ) ) { //RTC 168417 / JIRA MYFACES-3975 //JSF 2.2 invoke PreClearFlashEvent facesContext . getApplication ( ) . publishEvent ( facesContext , PreClearFlashEvent . class , map ) ; // Clear everything - note that because of naming conventions, // this will in fact automatically recurse through all children // grandchildren etc. - which is kind of a design flaw of SubKeyMap, // but one we're relying on // NOTE that we do not need a null check here, because there will // always be an execute Map, however sometimes an empty one! map . clear ( ) ; } }
Destroy the execute FlashMap because it is not needed anymore .