Issue Details (XML | Word | Printable)

Key: SM-33
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Matt Raible
Reporter: Matt Raible
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Struts Menu

Bug in removeMenu of MenuRepository

Created: 09/May/06 02:03 AM   Updated: 10/May/06 01:57 AM   Resolved: 10/May/06 01:57 AM
Component/s: Menu Core
Affects Version/s: 2.3
Fix Version/s: 2.4


 Description  « Hide
Moved from SourceForge http://sourceforge.net/tracker/index.php?func=detail&aid=1121232&group_id=48726&atid=453974:

Currently, removeMenu in the class MenuRepository does
not remove the MenuComponent because it is making a
call to Map.remove(MenuComponent) instead of
Map.remove(String) where String is a key in the Map.


Current code:
/**
* Allows easy removal of a menu by its name.
* @param name
*/
public void removeMenu(String name) {
if (menus.containsKey(name)) {
menus.remove(getMenu
(name));
}
}

Fixed code:

/**
* Allows easy removal of a menu by its name.
* @param name
*/
public void removeMenu(String name) {
menus.remove(name);
}

Matt Raible made changes - 10/May/06 01:57 AM
Field Original Value New Value
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]