jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1815666 - in /jmeter/trunk: src/components/org/apache/jmeter/modifiers/ src/components/org/apache/jmeter/visualizers/backend/ src/core/org/apache/jmeter/reporters/ src/core/org/apache/jmeter/samplers/ src/core/org/apache/jmeter/services/ s...
Date Sat, 18 Nov 2017 13:41:35 GMT
Author: pmouawad
Date: Sat Nov 18 13:41:34 2017
New Revision: 1815666

URL: http://svn.apache.org/viewvc?rev=1815666&view=rev
Log:
 Removed (some more) commented out code
 Contributed by Graham Russell
 This closes #331

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/modifiers/CounterConfig.java
    jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/BackendListener.java
    jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java
    jmeter/trunk/src/core/org/apache/jmeter/reporters/Summariser.java
    jmeter/trunk/src/core/org/apache/jmeter/samplers/DataStrippingSampleSender.java
    jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java
    jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleSaveConfiguration.java
    jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleSender.java
    jmeter/trunk/src/core/org/apache/jmeter/services/FileServer.java
    jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java
    jmeter/trunk/src/core/org/apache/jmeter/util/SSLManager.java
    jmeter/trunk/src/core/org/apache/jmeter/util/XPathUtil.java
    jmeter/trunk/src/core/org/apache/jmeter/util/keystore/JmeterKeyStore.java
    jmeter/trunk/src/functions/org/apache/jmeter/functions/XPathWrapper.java
    jmeter/trunk/test/src/org/apache/jmeter/assertions/SMIMEAssertionTest.java

Modified: jmeter/trunk/src/components/org/apache/jmeter/modifiers/CounterConfig.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/modifiers/CounterConfig.java?rev=1815666&r1=1815665&r2=1815666&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/modifiers/CounterConfig.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/modifiers/CounterConfig.java Sat Nov 18
13:41:34 2017
@@ -57,7 +57,6 @@ public class CounterConfig extends Abstr
     private static final boolean RESET_ON_THREAD_GROUP_ITERATION_DEFAULT = false;
 
     // This class is not cloned per thread, so this is shared
-    //@GuardedBy("this")
     private long globalCounter = Long.MIN_VALUE;
 
     // Used for per-thread/user numbers

Modified: jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/BackendListener.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/BackendListener.java?rev=1815666&r1=1815665&r2=1815666&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/BackendListener.java
(original)
+++ jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/BackendListener.java
Sat Nov 18 13:41:34 2017
@@ -106,7 +106,6 @@ public class BackendListener extends Abs
      * This is needed for distributed testing where there is 1 instance
      * per server. But we need the total to be shared.
      */
-    //@GuardedBy("LOCK") - needed to ensure consistency between this and instanceCount
     private static final Map<String, ListenerClientData> queuesByTestElementName =
             new ConcurrentHashMap<>();
 

Modified: jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java?rev=1815666&r1=1815665&r2=1815666&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java Sat Nov 18 13:41:34
2017
@@ -123,27 +123,22 @@ public class ResultCollector extends Abs
     // Lock used to guard static mutable variables
     private static final Object LOCK = new Object();
 
-    //@GuardedBy("LOCK")
     private static final Map<String, FileEntry> files = new HashMap<>();
 
     /**
      * Shutdown Hook that ensures PrintWriter is flushed is CTRL+C or kill is called during
a test
      */
-    //@GuardedBy("LOCK")
     private static Thread shutdownHook;
 
-
     /**
      * The instance count is used to keep track of whether any tests are currently running.
      * It's not possible to use the constructor or threadStarted etc as tests may overlap
      * e.g. a remote test may be started,
      * and then a local test started whilst the remote test is still running.
      */
-    //@GuardedBy("LOCK")
     private static int instanceCount; // Keep track of how many instances are active
 
     // Instance variables (guarded by volatile)
-
     private transient volatile PrintWriter out;
 
     /**

Modified: jmeter/trunk/src/core/org/apache/jmeter/reporters/Summariser.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/reporters/Summariser.java?rev=1815666&r1=1815665&r2=1815666&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/reporters/Summariser.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/reporters/Summariser.java Sat Nov 18 13:41:34
2017
@@ -98,10 +98,8 @@ public class Summariser extends Abstract
     /*
      * This map allows summarisers with the same name to contribute to the same totals.
      */
-    //@GuardedBy("LOCK") - needed to ensure consistency between this and INSTANCE_COUNT
     private static final Map<String, Totals> ACCUMULATORS = new ConcurrentHashMap<>();
 
-    //@GuardedBy("LOCK")
     private static int INSTANCE_COUNT; // number of active tests
 
     /*
@@ -110,7 +108,6 @@ public class Summariser extends Abstract
      * as they are not shared between threads
      * However the contents do need to be synchronized.
      */
-    //@GuardedBy("myTotals")
     private transient Totals myTotals = null;
 
     // Name of the accumulator. Set up by testStarted().

Modified: jmeter/trunk/src/core/org/apache/jmeter/samplers/DataStrippingSampleSender.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/samplers/DataStrippingSampleSender.java?rev=1815666&r1=1815665&r2=1815666&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/samplers/DataStrippingSampleSender.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/samplers/DataStrippingSampleSender.java Sat Nov
18 13:41:34 2017
@@ -30,8 +30,6 @@ import org.slf4j.LoggerFactory;
  * The standard remote sample reporting should be more friendly to the main purpose of
  * remote testing - which is scalability.  To increase scalability, this class strips out
the
  * response data before sending.
- *
- *
  */
 public class DataStrippingSampleSender extends AbstractSampleSender implements Serializable
{
 

Modified: jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java?rev=1815666&r1=1815665&r2=1815666&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java Sat Nov 18 13:41:34
2017
@@ -205,10 +205,10 @@ public class SampleResult implements Ser
 
     private boolean success;
 
-    //@GuardedBy("this"")
-    /** files that this sample has been saved in */
-    /** In Non GUI mode and when best config is used, size never exceeds 1, 
-     * but as a compromise set it to 3 
+    /**
+     * Files that this sample has been saved in.
+     * In Non GUI mode and when best config is used, size never exceeds 1,
+     * but as a compromise set it to 3
      */
     private final Set<String> files = new HashSet<>(3);
 
@@ -224,9 +224,7 @@ public class SampleResult implements Ser
     /** time to first response */
     private long latency = 0;
 
-    /**
-     * time to end connecting
-     */
+    /** time to end connecting */
     private long connectTime = 0;
 
     /** Should thread start next iteration ? */
@@ -321,9 +319,9 @@ public class SampleResult implements Ser
         responseDataAsString = null;
         responseHeaders = res.responseHeaders;//OK
         responseMessage = res.responseMessage;//OK
-        /** 
-         * Don't copy this; it is per instance resultFileName = res.resultFileName;
-         */
+
+        // Don't copy this; it is per instance resultFileName = res.resultFileName;
+
         sampleCount = res.sampleCount;
         samplerData = res.samplerData;
         saveConfig = res.saveConfig;
@@ -1450,7 +1448,6 @@ public class SampleResult implements Ser
             while(true) {
                 getOffset(NANOTHREAD_SLEEP); // Can now afford to wait a bit longer between
checks
             }
-            
         }
 
         private static void getOffset(long wait) {
@@ -1464,7 +1461,6 @@ public class SampleResult implements Ser
                 Thread.currentThread().interrupt();
             }
         }
-        
     }
 
     /**

Modified: jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleSaveConfiguration.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleSaveConfiguration.java?rev=1815666&r1=1815665&r2=1815666&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleSaveConfiguration.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleSaveConfiguration.java Sat Nov
18 13:41:34 2017
@@ -85,9 +85,6 @@ public class SampleSaveConfiguration imp
     /** Indicates that the results file should be in CSV format. * */
     private static final String CSV = "csv"; // $NON_NLS-1$
 
-    /** Indicates that the results should be stored in a database. * */
-    //NOTUSED private static final String DATABASE = "db"; // $NON_NLS-1$
-
     /** A properties file indicator for true. * */
     private static final String TRUE = "true"; // $NON_NLS-1$
 
@@ -287,9 +284,7 @@ public class SampleSaveConfiguration imp
 
     public static final String DEFAULT_DELIMITER = ","; // $NON_NLS-1$
 
-    /**
-     * Read in the properties having to do with saving from a properties file.
-     */
+    // Read in the properties having to do with saving from a properties file.
     static {
         Properties props = JMeterUtils.getJMeterProperties();
 

Modified: jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleSender.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleSender.java?rev=1815666&r1=1815665&r2=1815666&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleSender.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/samplers/StatisticalSampleSender.java Sat Nov
18 13:41:34 2017
@@ -70,7 +70,6 @@ public class StatisticalSampleSender ext
 
     private final List<SampleEvent> sampleStore = new ArrayList<>();
 
-    //@GuardedBy("sampleStore") TODO perhaps use ConcurrentHashMap ?
     private final Map<String, StatisticalSampleResult> sampleTable = new HashMap<>();
 
     // Settings; readResolve sets these from the server/client values as appropriate
@@ -81,9 +80,7 @@ public class StatisticalSampleSender ext
 
     private transient volatile boolean keyOnThreadName;
 
-
     // variables maintained by server code
-    // @GuardedBy("sampleStore")
     private transient int sampleCount; // maintain separate count of samples for speed
 
     private transient long batchSendTime = -1; // @GuardedBy("sampleStore")

Modified: jmeter/trunk/src/core/org/apache/jmeter/services/FileServer.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/services/FileServer.java?rev=1815666&r1=1815665&r2=1815666&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/services/FileServer.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/services/FileServer.java Sat Nov 18 13:41:34 2017
@@ -75,10 +75,8 @@ public class FileServer {
         JMeterUtils.getPropDefault("jmeter.save.saveservice.base_prefix", // $NON-NLS-1$
                 BASE_PREFIX_DEFAULT);
 
-    //@GuardedBy("this")
     private File base;
 
-    //@GuardedBy("this") NOTE this also guards against possible window in checkForOpenFiles()
     private final Map<String, FileEntry> files = new HashMap<>();
 
     private static final FileServer server = new FileServer();

Modified: jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java?rev=1815666&r1=1815665&r2=1815666&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java Sat Nov 18 13:41:34 2017
@@ -106,12 +106,8 @@ public class JMeterUtils implements Unit
     private static volatile ResourceBundle resources;
 
     // What host am I running on?
-
-    //@GuardedBy("this")
     private static String localHostIP = null;
-    //@GuardedBy("this")
     private static String localHostName = null;
-    //@GuardedBy("this")
     private static String localHostFullName = null;
     
     // TODO needs to be synch? Probably not changed after threads have started

Modified: jmeter/trunk/src/core/org/apache/jmeter/util/SSLManager.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/util/SSLManager.java?rev=1815666&r1=1815665&r2=1815666&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/util/SSLManager.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/util/SSLManager.java Sat Nov 18 13:41:34 2017
@@ -60,7 +60,6 @@ public abstract class SSLManager {
     private static final String PKCS12 = "pkcs12"; // $NON-NLS-1$
 
     /** Singleton instance of the manager */
-    //@GuardedBy("this")
     private static SSLManager manager;
 
     private static final boolean IS_SSL_SUPPORTED = true;

Modified: jmeter/trunk/src/core/org/apache/jmeter/util/XPathUtil.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/util/XPathUtil.java?rev=1815666&r1=1815665&r2=1815666&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/util/XPathUtil.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/util/XPathUtil.java Sat Nov 18 13:41:34 2017
@@ -67,7 +67,6 @@ public class XPathUtil {
         super();
     }
 
-    //@GuardedBy("this")
     private static DocumentBuilderFactory documentBuilderFactory;
 
     /**

Modified: jmeter/trunk/src/core/org/apache/jmeter/util/keystore/JmeterKeyStore.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/util/keystore/JmeterKeyStore.java?rev=1815666&r1=1815665&r2=1815666&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/util/keystore/JmeterKeyStore.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/util/keystore/JmeterKeyStore.java Sat Nov 18 13:41:34
2017
@@ -63,10 +63,8 @@ public final class JmeterKeyStore {
     private Map<String, PrivateKey> privateKeyByAlias = new HashMap<>();
     private Map<String, X509Certificate[]> certsByAlias = new HashMap<>();
 
-    //@GuardedBy("this")
     private int last_user;
 
-
     /**
      * @param type
      *            type of the {@link KeyStore}

Modified: jmeter/trunk/src/functions/org/apache/jmeter/functions/XPathWrapper.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/functions/org/apache/jmeter/functions/XPathWrapper.java?rev=1815666&r1=1815665&r2=1815666&view=diff
==============================================================================
--- jmeter/trunk/src/functions/org/apache/jmeter/functions/XPathWrapper.java (original)
+++ jmeter/trunk/src/functions/org/apache/jmeter/functions/XPathWrapper.java Sat Nov 18 13:41:34
2017
@@ -47,7 +47,6 @@ final class XPathWrapper {
      * </ul>
      * The key is the concatenation of the file name and the XPath string
      */
-    //@GuardedBy("fileContainers")
     private static final Map<String, XPathFileContainer> fileContainers =
             new HashMap<>();
 

Modified: jmeter/trunk/test/src/org/apache/jmeter/assertions/SMIMEAssertionTest.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/assertions/SMIMEAssertionTest.java?rev=1815666&r1=1815665&r2=1815666&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/assertions/SMIMEAssertionTest.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/assertions/SMIMEAssertionTest.java Sat Nov 18
13:41:34 2017
@@ -143,7 +143,6 @@ public class SMIMEAssertionTest {
     public void testSignerSignerDN() {
         SMIMEAssertionTestElement testElement = new SMIMEAssertionTestElement();
         testElement.setSignerCheckConstraints(true);
-//        String signerDn = "CN=alice example, E=alice@a.example.com, O=Example Ltd, L=Wherever,
C=AU";
         String signerDn = "C=AU, L=Wherever, O=Example Ltd, E=alice@a.example.com, CN=alice
example";
         testElement
                 .setSignerDn(signerDn);



Mime
View raw message