jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1654705 - /jmeter/trunk/src/core/org/apache/jmeter/gui/action/CheckDirty.java
Date Sun, 25 Jan 2015 21:12:41 GMT
Author: pmouawad
Date: Sun Jan 25 21:12:41 2015
New Revision: 1654705

URL: http://svn.apache.org/r1654705
Log:
Ensure in case of exception that flags are reset correctly

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

Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/action/CheckDirty.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/action/CheckDirty.java?rev=1654705&r1=1654704&r2=1654705&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/action/CheckDirty.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/action/CheckDirty.java Sun Jan 25 21:12:41
2015
@@ -91,10 +91,13 @@ public class CheckDirty extends Abstract
             GuiPackage guiPackage = GuiPackage.getInstance();
             JMeterTreeNode[] nodes = guiPackage.getTreeListener().getSelectedNodes();
             removeMode = true;
-            for (int i = nodes.length - 1; i >= 0; i--) {
-                guiPackage.getTreeModel().getCurrentSubTree(nodes[i]).traverse(this);
+            try {
+                for (int i = nodes.length - 1; i >= 0; i--) {
+                    guiPackage.getTreeModel().getCurrentSubTree(nodes[i]).traverse(this);
+                }
+            } finally {
+                removeMode = false;
             }
-            removeMode = false;
         }
         // If we are merging in another test plan, we know the test plan is dirty now
         if(action.equals(ActionNames.SUB_TREE_MERGED)) {
@@ -103,9 +106,12 @@ public class CheckDirty extends Abstract
         else {
             dirty = false;
             checkMode = true;
-            HashTree wholeTree = GuiPackage.getInstance().getTreeModel().getTestPlan();
-            wholeTree.traverse(this);
-            checkMode = false;
+            try {
+                HashTree wholeTree = GuiPackage.getInstance().getTreeModel().getTestPlan();
+                wholeTree.traverse(this);
+            } finally {
+                checkMode = false;
+            }
         }
         GuiPackage.getInstance().setDirty(dirty);
     }



Mime
View raw message