Bug 57055

Summary: CheckDirty.doAction should clear previousGuiItems for SUB_TREE_SAVED
Product: JMeter Reporter: Sebb <sebb>
Component: MainAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: normal CC: emi, p.mouawad
Priority: P2    
Version: 2.11   
Target Milestone: ---   
Hardware: All   
OS: All   

Description Sebb 2014-10-03 19:14:16 UTC
The code for CheckDirty.doAction(SUB_TREE_SAVED) looks odd.

It calls subTree.traverse(this) which calls previousGuiItems.put() for each node. This would appear to add the whole tree to the map.

I suspect this works because the put() will replace any entries with the same key.

However, if the previousGuiItems map contains any stale entries, they won't be removed.

I would have expected the code to clear the map before repopulating it.
This will then catch any errors that may have crept in.
Comment 1 Philippe Mouawad 2017-09-03 19:51:12 UTC
Author: pmouawad
Date: Sun Sep  3 19:50:08 2017
New Revision: 1807166

URL: http://svn.apache.org/viewvc?rev=1807166&view=rev
Log:
Bug 57055 - CheckDirty.doAction should clear previousGuiItems for SUB_TREE_SAVED
Bugzilla Id: 57055

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/gui/action/CheckDirty.java
    jmeter/trunk/xdocs/changes.xml