Bug 57055 - CheckDirty.doAction should clear previousGuiItems for SUB_TREE_SAVED
Summary: CheckDirty.doAction should clear previousGuiItems for SUB_TREE_SAVED
Status: RESOLVED FIXED
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: Main (show other bugs)
Version: 2.11
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-03 19:14 UTC by Sebb
Modified: 2017-09-03 19:51 UTC (History)
2 users (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
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
Comment 2 The ASF infrastructure team 2022-09-24 20:37:58 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3446