Author: pmouawad
Date: Tue Mar  1 12:35:26 2016
New Revision: 1733057

URL: http://svn.apache.org/viewvc?rev=1733057&view=rev
Log:
Bug 59082 - remove the "TestCompiler.useStaticSet" parameter
Contributed by Benoit Wiart
#resolve #143
Bugzilla Id: 59082

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/control/GenericController.java
    jmeter/trunk/src/core/org/apache/jmeter/threads/AbstractThreadGroup.java
    jmeter/trunk/src/core/org/apache/jmeter/threads/TestCompiler.java
    jmeter/trunk/xdocs/changes.xml

Modified: jmeter/trunk/src/core/org/apache/jmeter/control/GenericController.java
URL: 
http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/control/GenericController.java?rev=1733057&r1=1733056&r2=1733057&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/control/GenericController.java 
(original)
+++ jmeter/trunk/src/core/org/apache/jmeter/control/GenericController.java Tue 
Mar  1 12:35:26 2016
@@ -31,7 +31,6 @@ import org.apache.jmeter.engine.event.Lo
 import org.apache.jmeter.samplers.Sampler;
 import org.apache.jmeter.testelement.AbstractTestElement;
 import org.apache.jmeter.testelement.TestElement;
-import org.apache.jmeter.threads.TestCompiler;
 import org.apache.jmeter.threads.TestCompilerHelper;
 import org.apache.jorphan.logging.LoggingManager;
 import org.apache.log.Logger;
@@ -57,8 +56,7 @@ public class GenericController extends A
     private transient LinkedList<LoopIterationListener> iterationListeners = 
new LinkedList<>();
 
     // Only create the map if it is required
-    private transient ConcurrentMap<TestElement, Object> children = 
-            TestCompiler.IS_USE_STATIC_SET ? null : new 
ConcurrentHashMap<TestElement, Object>();
+    private transient ConcurrentMap<TestElement, Object> children = new 
ConcurrentHashMap<TestElement, Object>();
 
     private static final Object DUMMY = new Object();
 
@@ -422,7 +420,7 @@ public class GenericController extends A
     
     protected Object readResolve(){
         iterationListeners = new LinkedList<>();
-        children = TestCompiler.IS_USE_STATIC_SET ? null : new 
ConcurrentHashMap<TestElement, Object>();
+        children = new ConcurrentHashMap<TestElement, Object>();
         subControllersAndSamplers = new ArrayList<>();
 
         return this;

Modified: 
jmeter/trunk/src/core/org/apache/jmeter/threads/AbstractThreadGroup.java
URL: 
http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/threads/AbstractThreadGroup.java?rev=1733057&r1=1733056&r2=1733057&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/threads/AbstractThreadGroup.java 
(original)
+++ jmeter/trunk/src/core/org/apache/jmeter/threads/AbstractThreadGroup.java 
Tue Mar  1 12:35:26 2016
@@ -46,8 +46,7 @@ public abstract class AbstractThreadGrou
     private static final long serialVersionUID = 240L;
 
     // Only create the map if it is required
-    private transient final ConcurrentMap<TestElement, Object> children = 
-            TestCompiler.IS_USE_STATIC_SET ? null : new 
ConcurrentHashMap<TestElement, Object>();
+    private transient final ConcurrentMap<TestElement, Object> children = new 
ConcurrentHashMap<TestElement, Object>();
 
     private static final Object DUMMY = new Object();
 

Modified: jmeter/trunk/src/core/org/apache/jmeter/threads/TestCompiler.java
URL: 
http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/threads/TestCompiler.java?rev=1733057&r1=1733056&r2=1733057&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/threads/TestCompiler.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/threads/TestCompiler.java Tue Mar  
1 12:35:26 2016
@@ -41,7 +41,6 @@ import org.apache.jmeter.samplers.Sample
 import org.apache.jmeter.testbeans.TestBeanHelper;
 import org.apache.jmeter.testelement.TestElement;
 import org.apache.jmeter.timers.Timer;
-import org.apache.jmeter.util.JMeterUtils;
 import org.apache.jorphan.collections.HashTree;
 import org.apache.jorphan.collections.HashTreeTraverser;
 import org.apache.jorphan.logging.LoggingManager;
@@ -58,17 +57,12 @@ public class TestCompiler implements Has
 
     private static final Logger LOG = LoggingManager.getLoggerForClass();
 
-    /**
-     * Set this property {@value} to true to revert to using a shared static 
set.
-     */
-    private static final String USE_STATIC_SET = "TestCompiler.useStaticSet";
-    
-    /**
-     * The default value - {@value} - assumed for {@link #USE_STATIC_SET}. 
+    /** 
+     * @deprecated since 3.0 will be removed in the next version 3.1. 
+     * Constant is not used since 3.0
      */
-    private static final boolean USE_STATIC_SET_DEFAULT = false;
-
-    public static final boolean IS_USE_STATIC_SET = 
JMeterUtils.getPropDefault(USE_STATIC_SET, USE_STATIC_SET_DEFAULT);
+    @Deprecated
+    public static final boolean IS_USE_STATIC_SET = false;
 
     /**
      * This set keeps track of which ObjectPairs have been seen.
@@ -158,7 +152,7 @@ public class TestCompiler implements Has
             boolean duplicate = false;
             // Bug 53750: this condition used to be in 
ObjectPair#addTestElements()
             if (parent instanceof Controller && (child instanceof Sampler || 
child instanceof Controller)) {
-                if (!IS_USE_STATIC_SET && parent instanceof 
TestCompilerHelper) {
+                if (parent instanceof TestCompilerHelper) {
                     TestCompilerHelper te = (TestCompilerHelper) parent;
                     duplicate = !te.addTestElementOnce(child);
                 } else { // this is only possible for 3rd party controllers by 
default

Modified: jmeter/trunk/xdocs/changes.xml
URL: 
http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1733057&r1=1733056&r2=1733057&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Tue Mar  1 12:35:26 2016
@@ -229,6 +229,7 @@ Summary
 <li><bug>59046</bug>JMeter Gui Replace controller should keep the name and the 
selection. Contributed by Benoit Wiart (benoit dot wiart at gmail.com)</li>
 <li><bug>59038</bug>Deprecate HTTPClient 3.1 related elements</li>
 <li><bug>59094</bug> - Drop support of old JMX file format</li>
+<li><bug>59082</bug>Remove the "TestCompiler.useStaticSet" parameter. 
Contributed by Benoit Wiart (benoit dot wiart at gmail.com)</li>
 </ul>
 <ch_section>Non-functional changes</ch_section>
 <ul>


Reply via email to