rpcbenchmark: use lambdas 75/57175/2
authorStephen Kitt <skitt@redhat.com>
Tue, 16 May 2017 15:45:54 +0000 (17:45 +0200)
committerRobert Varga <nite@hq.sk>
Tue, 16 May 2017 23:16:55 +0000 (23:16 +0000)
This series of patches uses lambdas instead of anonymous classes for
functional interfaces when possible. Lambdas are replaced with method
references when appropriate.

Change-Id: Ib75e49cf502ee5c646525ebaef09697cdf1dcff0
Signed-off-by: Stephen Kitt <skitt@redhat.com>
benchmark/rpcbenchmark/src/main/java/rpcbenchmark/impl/RpcbenchmarkProvider.java

index a0cc1a1..503bd17 100644 (file)
@@ -105,12 +105,7 @@ public class RpcbenchmarkProvider implements BindingAwareProvider, AutoCloseable
         try {
             ExecutorService executor = Executors.newFixedThreadPool(input.getNumClients().intValue());
 
-            final Runnable testRun = new Runnable() {
-                @Override
-                public void run() {
-                    client.runTest(input.getIterations().intValue());
-                }
-            };
+            final Runnable testRun = () -> client.runTest(input.getIterations().intValue());
 
             LOG.info("Test Started");
             long startTime = System.nanoTime();

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.