public void addHandler(Portal portal, PortalHandler handler)
{
String portalContext = portal.getPortalContext();
Map<String, PortalHandler> handlerMap = getHandlerMap(portal);
String urlFragment = handler.getUrlFragment();
<BUG>PortalHandler ph = (PortalHandler) safeGet(handlerMap, urlFragment);
if (ph != null)</BUG>
{
handler.deregister(portal);
log.warn("Handler Present on  " + urlFragment + " will replace " + ph

public void addHandler(Portal portal, PortalHandler handler)
{
String portalContext = portal.getPortalContext();
Map<String, PortalHandler> handlerMap = getHandlerMap(portal);
String urlFragment = handler.getUrlFragment();
PortalHandler ph = handlerMap.get(urlFragment);
if (ph != null)
{
handler.deregister(portal);
log.warn("Handler Present on  " + urlFragment + " will replace " + ph
