jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1240581 - /jmeter/trunk/src/components/org/apache/jmeter/modifiers/BSFPreProcessor.java
Date Sat, 04 Feb 2012 18:33:33 GMT
Author: pmouawad
Date: Sat Feb  4 18:33:33 2012
New Revision: 1240581

URL: http://svn.apache.org/viewvc?rev=1240581&view=rev
Log:
Ensure terminate is called

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/modifiers/BSFPreProcessor.java

Modified: jmeter/trunk/src/components/org/apache/jmeter/modifiers/BSFPreProcessor.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/modifiers/BSFPreProcessor.java?rev=1240581&r1=1240580&r2=1240581&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/modifiers/BSFPreProcessor.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/modifiers/BSFPreProcessor.java Sat Feb 
4 18:33:33 2012
@@ -33,13 +33,17 @@ public class BSFPreProcessor extends BSF
     private static final long serialVersionUID = 232L;
 
     public void process(){
+        BSFManager mgr =null;
         try {
-            BSFManager mgr = getManager();
+            mgr = getManager();
             if (mgr == null) { return; }
             processFileOrScript(mgr);
-            mgr.terminate();
         } catch (BSFException e) {
             log.warn("Problem in BSF script "+e);
+        } finally {
+            if (mgr != null) {
+                mgr.terminate();
+            }
         }
     }
 }



Mime
View raw message