Author: fschumacher
Date: Mon Feb 12 16:49:46 2018
New Revision: 1824020

URL: http://svn.apache.org/viewvc?rev=1824020&view=rev
Log:
Convert to lambda expression

Part of #356 on Github. Contributed by Graham Russell (graham at ham1.co.uk)

Modified:
    
jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/ActiveThreadsGraphConsumer.java

Modified: 
jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/ActiveThreadsGraphConsumer.java
URL: 
http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/ActiveThreadsGraphConsumer.java?rev=1824020&r1=1824019&r2=1824020&view=diff
==============================================================================
--- 
jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/ActiveThreadsGraphConsumer.java
 (original)
+++ 
jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/ActiveThreadsGraphConsumer.java
 Mon Feb 12 16:49:46 2018
@@ -26,7 +26,6 @@ import org.apache.jmeter.report.processo
 import org.apache.jmeter.report.processor.graph.AbstractGraphConsumer;
 import org.apache.jmeter.report.processor.graph.AbstractOverTimeGraphConsumer;
 import org.apache.jmeter.report.processor.graph.AbstractSeriesSelector;
-import org.apache.jmeter.report.processor.graph.GraphValueSelector;
 import org.apache.jmeter.report.processor.graph.GroupInfo;
 import org.apache.jmeter.report.processor.graph.TimeStampKeysSelector;
 
@@ -77,15 +76,11 @@ public class ActiveThreadsGraphConsumer
                             return Collections.emptyList();
                         }
                     }
-                }, new GraphValueSelector() {
-
-                    @Override
-                    public Double select(String series, Sample sample) {
-                        if(!sample.isEmptyController()) {
-                            return Double.valueOf(sample.getGroupThreads());
-                        } else {
-                            return null;
-                        }
+                }, (series, sample) -> {
+                    if (!sample.isEmptyController()) {
+                        return Double.valueOf(sample.getGroupThreads());
+                    } else {
+                        return null;
                     }
                 }, false, false));
         return groupInfos;


Reply via email to