Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] Bug in ToolManager

Zoidberg wrote:
RC13SDK ToolManager.java
row 633-641:

IMenuManager mapMenu = manager.findMenuUsingPath("map");
if( mapMenu == null ){
  MenuManager tmp = new MenuManager(
  Messages.ToolManager_menu_manager_title, "map");
manager.appendToGroup(IWorkbenchActionConstants.M_NAVIGATE, navigateMenu);
  mapMenu.add(new GroupMarker("mapStart"));
  mapMenu.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
  mapMenu.add(new GroupMarker("mapEnd"));
}

If mapMenu is null and we enter the if-block where mapMenu is never changed the mapMenu.add will ever throw a NullPointerException.
I guess the tmp menuManager should be the new mapMenu?
It should; you want to make the change?


Back to the top