jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1776635 - in /jmeter/trunk/src/components/org/apache/jmeter: assertions/ config/ control/ extractor/ timers/
Date Fri, 30 Dec 2016 20:38:01 GMT
Author: pmouawad
Date: Fri Dec 30 20:38:01 2016
New Revision: 1776635

URL: http://svn.apache.org/viewvc?rev=1776635&view=rev
Log:
Sonar : Remove useless assignment

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/assertions/SMIMEAssertion.java
    jmeter/trunk/src/components/org/apache/jmeter/config/RandomVariableConfig.java
    jmeter/trunk/src/components/org/apache/jmeter/control/CriticalSectionController.java
    jmeter/trunk/src/components/org/apache/jmeter/extractor/JSoupExtractor.java
    jmeter/trunk/src/components/org/apache/jmeter/extractor/JoddExtractor.java
    jmeter/trunk/src/components/org/apache/jmeter/timers/ConstantThroughputTimer.java

Modified: jmeter/trunk/src/components/org/apache/jmeter/assertions/SMIMEAssertion.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/assertions/SMIMEAssertion.java?rev=1776635&r1=1776634&r2=1776635&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/assertions/SMIMEAssertion.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/assertions/SMIMEAssertion.java Fri Dec 30
20:38:01 2016
@@ -83,7 +83,7 @@ class SMIMEAssertion {
         checkForBouncycastle();
         AssertionResult res = new AssertionResult(name);
         try {
-            MimeMessage msg = null;
+            MimeMessage msg;
             final int msgPos = testElement.getSpecificMessagePositionAsInt();
             if (msgPos < 0){ // means counting from end
                 SampleResult[] subResults = response.getSubResults();

Modified: jmeter/trunk/src/components/org/apache/jmeter/config/RandomVariableConfig.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/config/RandomVariableConfig.java?rev=1776635&r1=1776634&r2=1776635&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/config/RandomVariableConfig.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/config/RandomVariableConfig.java Fri Dec
30 20:38:01 2016
@@ -106,7 +106,7 @@ public class RandomVariableConfig extend
     /** {@inheritDoc} */
     @Override
     public void iterationStart(LoopIterationEvent iterEvent) {
-        Random randGen=null;
+        Random randGen;
         if (getPerThread()){
             randGen = perThreadRandom.get();
         } else {

Modified: jmeter/trunk/src/components/org/apache/jmeter/control/CriticalSectionController.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/control/CriticalSectionController.java?rev=1776635&r1=1776634&r2=1776635&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/control/CriticalSectionController.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/control/CriticalSectionController.java Fri
Dec 30 20:38:01 2016
@@ -107,7 +107,7 @@ public class CriticalSectionController e
     private ReentrantLock getOrCreateLock() {
         String lockName = getLockName();
         ReentrantLock lock = LOCK_MAP.get(lockName);
-        ReentrantLock prev = null;
+        ReentrantLock prev;
         if (lock != null) {
             return lock;
         }

Modified: jmeter/trunk/src/components/org/apache/jmeter/extractor/JSoupExtractor.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/extractor/JSoupExtractor.java?rev=1776635&r1=1776634&r2=1776635&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/extractor/JSoupExtractor.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/extractor/JSoupExtractor.java Fri Dec 30
20:38:01 2016
@@ -55,7 +55,7 @@ public class JSoupExtractor implements E
     public int extract(String expression, String attribute, int matchNumber,
             String inputString, List<String> result, int found,
             String cacheKey) {
-        Document document = null;
+        Document document;
         if (cacheKey != null) {
             document = (Document) 
                     JMeterContextService.getContext().getSamplerContext().get(CACHE_KEY_PREFIX+cacheKey);

Modified: jmeter/trunk/src/components/org/apache/jmeter/extractor/JoddExtractor.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/extractor/JoddExtractor.java?rev=1776635&r1=1776634&r2=1776635&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/extractor/JoddExtractor.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/extractor/JoddExtractor.java Fri Dec 30
20:38:01 2016
@@ -61,7 +61,7 @@ public class JoddExtractor implements Ex
     public int extract(String expression, String attribute, int matchNumber,
             String inputString, List<String> result, int found,
             String cacheKey) {
-        NodeSelector nodeSelector = null;
+        NodeSelector nodeSelector;
         if (cacheKey != null) {
             nodeSelector = (NodeSelector) 
                     JMeterContextService.getContext().getSamplerContext().get(CACHE_KEY_PREFIX+cacheKey);

Modified: jmeter/trunk/src/components/org/apache/jmeter/timers/ConstantThroughputTimer.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/timers/ConstantThroughputTimer.java?rev=1776635&r1=1776634&r2=1776635&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/timers/ConstantThroughputTimer.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/timers/ConstantThroughputTimer.java Fri
Dec 30 20:38:01 2016
@@ -172,7 +172,7 @@ public class ConstantThroughputTimer ext
 
     // Calculate the delay based on the mode
     private long calculateDelay() {
-        long delay = 0;
+        long delay;
         // N.B. we fetch the throughput each time, as it may vary during a test
         double msPerRequest = (MILLISEC_PER_MIN / getThroughput());
         switch (mode) {



Mime
View raw message