jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1514609 - /jmeter/trunk/src/core/org/apache/jmeter/samplers/BatchSampleSender.java
Date Fri, 16 Aug 2013 08:12:01 GMT
Author: sebb
Date: Fri Aug 16 08:12:01 2013
New Revision: 1514609

URL: http://svn.apache.org/r1514609
Log:
Suppress checked warning as it is safe to do.
Use a temporary variable to localise the scope of the suppression.

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/samplers/BatchSampleSender.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/samplers/BatchSampleSender.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/samplers/BatchSampleSender.java?rev=1514609&r1=1514608&r2=1514609&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/samplers/BatchSampleSender.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/samplers/BatchSampleSender.java Fri Aug 16 08:12:01
2013
@@ -168,7 +168,9 @@ public class BatchSampleSender extends A
             }
 
             if (sendNow){
-                clonedStore = (ArrayList<SampleEvent>)((ArrayList<SampleEvent>)sampleStore).clone();
+                @SuppressWarnings("unchecked") // OK because sampleStore is of type ArrayList<SampleEvent>
+                final ArrayList<SampleEvent> clone = (ArrayList<SampleEvent>)((ArrayList<SampleEvent>)sampleStore).clone();
+                clonedStore = clone;
                 sampleStore.clear();
                 if (timeThresholdMs != -1) {
                     this.batchSendTime = now + timeThresholdMs;



Mime
View raw message