[udig-devel] Bug in ToolManager
Jody Garnett
jgarnett at refractions.net
Mon Mar 3 11:35:33 PST 2008
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?
More information about the udig-devel
mailing list