#1 PathTreeDictionary.remove does not work

v1.0_(example)
accepted
nobody
None
5
2013-02-17
2009-04-23
Anonymous
No

PathTreeDictionary.remove does not work because it is using the wrong array element returned from get() in the call to remove(). The function should look like this. The original code was using result[1]. A work around for this bug is to use dict.remove(dict.get("key")).

public synchronized Object[] remove(String path) {
Object[] result = get(path);
if (result[0] != null)
return remove(result[0]);
return result;
}

Discussion

  • Actually the work around needs to be dict.remove(dict.get("key")[0]). Sorry for the misprint.

     
  • planned for 101

     
    • status: open --> accepted
    • milestone: --> v1.0_(example)
     


Anonymous


Cancel   Add attachments