Details
-
Bug
-
Resolution: Fixed
-
Major
-
1.3.2, 1.4 M2
-
None
-
named rule, notification
-
Unit
-
Description
Named rules cannot be removed from the notification manager, since the removeNamedRule tries to remove the rule in the vector of that named rule, instead of removing the rule itself. See the addNamedRule and removeNamedRule methods below :
public void addNamedRule(String name, XWikiNotificationRule rule) { synchronized (namedrules) { Vector vnamedrules = (Vector) namedrules.get(name); if (vnamedrules==null) { vnamedrules = new Vector(); namedrules.put(name, vnamedrules); } vnamedrules.add(rule); } } public void removeNamedRule(String name) { synchronized (namedrules) { Vector vnamedrules = (Vector) namedrules.get(name); if (vnamedrules!=null) { vnamedrules.remove(name); if (vnamedrules.size()==0) namedrules.remove(name); } } }