changeset 1370:0ca62574e95f

Automatic migration to JDK 7 language features.
author shade
date Wed, 16 Nov 2016 11:40:00 +0100
parents 44b01917fb79
children 00f2c71a3d71
files jmh-core-benchmarks/src/main/java/org/openjdk/jmh/benchmarks/BlackholeBench.java jmh-core-benchmarks/src/main/java/org/openjdk/jmh/validation/tests/ThreadScalingTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/CompileTest.java jmh-core-ct/src/test/java/org/openjdk/jmh/ct/InMemoryGeneratorDestination.java jmh-core-it/src/test/java/org/openjdk/jmh/it/bulkwarmup/NonForkedModesTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/bulkwarmup/WarmupMode0_Test.java jmh-core-it/src/test/java/org/openjdk/jmh/it/bulkwarmup/WarmupMode1_Test.java jmh-core-it/src/test/java/org/openjdk/jmh/it/bulkwarmup/WarmupMode2_Test.java jmh-core-it/src/test/java/org/openjdk/jmh/it/bulkwarmup/WarmupMode3_Test.java jmh-core-it/src/test/java/org/openjdk/jmh/it/bulkwarmup/WarmupMode4_Test.java jmh-core-it/src/test/java/org/openjdk/jmh/it/bulkwarmup/WarmupMode5_Test.java jmh-core-it/src/test/java/org/openjdk/jmh/it/bulkwarmup/WarmupMode6_Test.java jmh-core-it/src/test/java/org/openjdk/jmh/it/ccontrol/LogConsumeProfiler.java jmh-core-it/src/test/java/org/openjdk/jmh/it/params/EmptyLeadingStringParamTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/params/EmptyMiddleStringParamTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/params/EmptyTrailingStringParamTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/params/Shared.java jmh-core-it/src/test/java/org/openjdk/jmh/it/profilers/ChangeJVMOptsTest.java jmh-core/src/main/java/org/openjdk/jmh/annotations/Mode.java jmh-core/src/main/java/org/openjdk/jmh/generators/core/BenchmarkGenerator.java jmh-core/src/main/java/org/openjdk/jmh/generators/core/BenchmarkGeneratorSession.java jmh-core/src/main/java/org/openjdk/jmh/generators/core/BenchmarkGeneratorUtils.java jmh-core/src/main/java/org/openjdk/jmh/generators/core/CompilerControlPlugin.java jmh-core/src/main/java/org/openjdk/jmh/generators/core/FileSystemDestination.java jmh-core/src/main/java/org/openjdk/jmh/generators/core/Identifiers.java jmh-core/src/main/java/org/openjdk/jmh/generators/core/MethodGroup.java jmh-core/src/main/java/org/openjdk/jmh/generators/core/Paddings.java jmh-core/src/main/java/org/openjdk/jmh/generators/core/StateObject.java jmh-core/src/main/java/org/openjdk/jmh/generators/core/StateObjectHandler.java jmh-core/src/main/java/org/openjdk/jmh/profile/AbstractHotspotProfiler.java jmh-core/src/main/java/org/openjdk/jmh/profile/AbstractPerfAsmProfiler.java jmh-core/src/main/java/org/openjdk/jmh/profile/ClassloaderProfiler.java jmh-core/src/main/java/org/openjdk/jmh/profile/GCProfiler.java jmh-core/src/main/java/org/openjdk/jmh/profile/LinuxPerfAsmProfiler.java jmh-core/src/main/java/org/openjdk/jmh/profile/LinuxPerfNormProfiler.java jmh-core/src/main/java/org/openjdk/jmh/profile/ProfilerFactory.java jmh-core/src/main/java/org/openjdk/jmh/profile/StackProfiler.java jmh-core/src/main/java/org/openjdk/jmh/profile/WinPerfAsmProfiler.java jmh-core/src/main/java/org/openjdk/jmh/results/BenchmarkResult.java jmh-core/src/main/java/org/openjdk/jmh/results/BenchmarkTaskResult.java jmh-core/src/main/java/org/openjdk/jmh/results/IterationResult.java jmh-core/src/main/java/org/openjdk/jmh/results/Result.java jmh-core/src/main/java/org/openjdk/jmh/results/RunResult.java jmh-core/src/main/java/org/openjdk/jmh/results/format/JSONResultFormat.java jmh-core/src/main/java/org/openjdk/jmh/results/format/LaTeXResultFormat.java jmh-core/src/main/java/org/openjdk/jmh/results/format/TextResultFormat.java jmh-core/src/main/java/org/openjdk/jmh/results/format/XSVResultFormat.java jmh-core/src/main/java/org/openjdk/jmh/runner/AbstractResourceReader.java jmh-core/src/main/java/org/openjdk/jmh/runner/ActionPlan.java jmh-core/src/main/java/org/openjdk/jmh/runner/BaseRunner.java jmh-core/src/main/java/org/openjdk/jmh/runner/BenchmarkHandler.java jmh-core/src/main/java/org/openjdk/jmh/runner/BenchmarkList.java jmh-core/src/main/java/org/openjdk/jmh/runner/CompilerHints.java jmh-core/src/main/java/org/openjdk/jmh/runner/ForkedMain.java jmh-core/src/main/java/org/openjdk/jmh/runner/Runner.java jmh-core/src/main/java/org/openjdk/jmh/runner/WorkloadParams.java jmh-core/src/main/java/org/openjdk/jmh/runner/format/TextReportFormat.java jmh-core/src/main/java/org/openjdk/jmh/runner/link/BinaryLinkClient.java jmh-core/src/main/java/org/openjdk/jmh/runner/link/BinaryLinkServer.java jmh-core/src/main/java/org/openjdk/jmh/runner/link/ClassConventions.java jmh-core/src/main/java/org/openjdk/jmh/runner/options/CommandLineOptions.java jmh-core/src/main/java/org/openjdk/jmh/runner/options/OptionsBuilder.java jmh-core/src/main/java/org/openjdk/jmh/util/BoundedPriorityQueue.java jmh-core/src/main/java/org/openjdk/jmh/util/ClassUtils.java jmh-core/src/main/java/org/openjdk/jmh/util/Deduplicator.java jmh-core/src/main/java/org/openjdk/jmh/util/DelegatingMultimap.java jmh-core/src/main/java/org/openjdk/jmh/util/FileUtils.java jmh-core/src/main/java/org/openjdk/jmh/util/HashsetMultimap.java jmh-core/src/main/java/org/openjdk/jmh/util/InputStreamDrainer.java jmh-core/src/main/java/org/openjdk/jmh/util/IntervalMap.java jmh-core/src/main/java/org/openjdk/jmh/util/ListStatistics.java jmh-core/src/main/java/org/openjdk/jmh/util/MultisetStatistics.java jmh-core/src/main/java/org/openjdk/jmh/util/Multisets.java jmh-core/src/main/java/org/openjdk/jmh/util/Optional.java jmh-core/src/main/java/org/openjdk/jmh/util/SampleBuffer.java jmh-core/src/main/java/org/openjdk/jmh/util/SingletonStatistics.java jmh-core/src/main/java/org/openjdk/jmh/util/Utils.java jmh-core/src/main/java/org/openjdk/jmh/util/lines/TestLineReader.java jmh-core/src/test/java/org/openjdk/jmh/results/format/ResultFormatTest.java jmh-core/src/test/java/org/openjdk/jmh/runner/CompilerHintsTest.java jmh-core/src/test/java/org/openjdk/jmh/util/BoundedPriorityQueueTest.java jmh-core/src/test/java/org/openjdk/jmh/util/MultisetsTest.java jmh-core/src/test/java/org/openjdk/jmh/util/TestLineTest.java jmh-generator-annprocess/src/main/java/org/openjdk/jmh/generators/annotations/APClassInfo.java jmh-generator-annprocess/src/main/java/org/openjdk/jmh/generators/annotations/APGeneratorSource.java jmh-generator-annprocess/src/main/java/org/openjdk/jmh/generators/annotations/APMethodInfo.java jmh-generator-asm/src/main/java/org/openjdk/jmh/generators/asm/ASMClassInfo.java jmh-generator-asm/src/main/java/org/openjdk/jmh/generators/asm/ASMFieldInfo.java jmh-generator-asm/src/main/java/org/openjdk/jmh/generators/asm/ASMMethodInfo.java jmh-generator-asm/src/main/java/org/openjdk/jmh/generators/asm/AnnotationInvocationHandler.java jmh-generator-asm/src/main/java/org/openjdk/jmh/generators/asm/ClassInfoRepo.java jmh-generator-reflection/src/main/java/org/openjdk/jmh/generators/reflection/RFClassInfo.java jmh-generator-reflection/src/main/java/org/openjdk/jmh/generators/reflection/RFConstructorInfo.java jmh-generator-reflection/src/main/java/org/openjdk/jmh/generators/reflection/RFGeneratorSource.java jmh-generator-reflection/src/main/java/org/openjdk/jmh/generators/reflection/RFMethodInfo.java jmh-samples/src/main/java/org/openjdk/jmh/samples/JMHSample_25_API_GA.java jmh-samples/src/main/java/org/openjdk/jmh/samples/JMHSample_26_BatchSize.java jmh-samples/src/main/java/org/openjdk/jmh/samples/JMHSample_29_StatesDAG.java jmh-samples/src/main/java/org/openjdk/jmh/samples/JMHSample_30_Interrupts.java jmh-samples/src/main/java/org/openjdk/jmh/samples/JMHSample_31_InfraParams.java jmh-samples/src/main/java/org/openjdk/jmh/samples/JMHSample_35_Profilers.java
diffstat 101 files changed, 346 insertions(+), 370 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-core-benchmarks/src/main/java/org/openjdk/jmh/benchmarks/BlackholeBench.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core-benchmarks/src/main/java/org/openjdk/jmh/benchmarks/BlackholeBench.java	Wed Nov 16 11:40:00 2016 +0100
@@ -41,7 +41,7 @@
     @Setup(Level.Iteration)
     public void makeGarbage() {
         // make some garbage to evict blackhole from the TLAB/eden
-        strs = new ArrayList<String>();
+        strs = new ArrayList<>();
         for (int i = 0; i < 100000; i++) {
             strs.add("str" + i);
         }
--- a/jmh-core-benchmarks/src/main/java/org/openjdk/jmh/validation/tests/ThreadScalingTest.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core-benchmarks/src/main/java/org/openjdk/jmh/validation/tests/ThreadScalingTest.java	Wed Nov 16 11:40:00 2016 +0100
@@ -61,7 +61,7 @@
         pw.println("  Threads are scaled from 1 to the number of hardware threads.");
         pw.println();
 
-        SortedSet<Integer> threads = new TreeSet<Integer>();
+        SortedSet<Integer> threads = new TreeSet<>();
         int max = Utils.figureOutHotCPUs();
         for (int t = max; t > 0; t /= 2) {
             threads.add(t);
--- a/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/CompileTest.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/CompileTest.java	Wed Nov 16 11:40:00 2016 +0100
@@ -61,7 +61,7 @@
             Assert.fail("Should have failed.");
         }
 
-        List<String> testErrors = new ArrayList<String>();
+        List<String> testErrors = new ArrayList<>();
         boolean contains = false;
         for (String e : destination.getErrors()) {
             if (!e.startsWith(SRC_PREFIX)) {
@@ -119,13 +119,13 @@
             return false;
         }
 
-        DiagnosticCollector<JavaFileObject> diagnostics = new DiagnosticCollector<JavaFileObject>();
+        DiagnosticCollector<JavaFileObject> diagnostics = new DiagnosticCollector<>();
 
         JavaCompiler javac = ToolProvider.getSystemJavaCompiler();
         StandardJavaFileManager fm = javac.getStandardFileManager(null, null, null);
         setupClassOutput(fm);
 
-        Collection<JavaSourceFromString> sources = new ArrayList<JavaSourceFromString>();
+        Collection<JavaSourceFromString> sources = new ArrayList<>();
         for (Map.Entry<String, String> e : destination.getClasses().entrySet()) {
             sources.add(new JavaSourceFromString(e.getKey(), e.getValue()));
         }
@@ -146,7 +146,7 @@
     }
 
     private static boolean doTestAnnprocess(Class<?> klass, InMemoryGeneratorDestination destination) {
-        DiagnosticCollector<JavaFileObject> diagnostics = new DiagnosticCollector<JavaFileObject>();
+        DiagnosticCollector<JavaFileObject> diagnostics = new DiagnosticCollector<>();
 
         JavaCompiler javac = ToolProvider.getSystemJavaCompiler();
         StandardJavaFileManager fm = javac.getStandardFileManager(null, null, null);
--- a/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/InMemoryGeneratorDestination.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/InMemoryGeneratorDestination.java	Wed Nov 16 11:40:00 2016 +0100
@@ -40,12 +40,12 @@
 
 public class InMemoryGeneratorDestination implements GeneratorDestination {
 
-    private List<String> errors = new ArrayList<String>();
-    private List<String> warnings = new ArrayList<String>();
-    private List<String> infos = new ArrayList<String>();
+    private List<String> errors = new ArrayList<>();
+    private List<String> warnings = new ArrayList<>();
+    private List<String> infos = new ArrayList<>();
 
-    private Map<String, StringWriter> classBodies = new HashMap<String, StringWriter>();
-    private Map<String, StringWriter> resourceBodies = new HashMap<String, StringWriter>();
+    private Map<String, StringWriter> classBodies = new HashMap<>();
+    private Map<String, StringWriter> resourceBodies = new HashMap<>();
 
     @Override
     public Writer newResource(String resourcePath) throws IOException {
@@ -117,7 +117,7 @@
     }
 
     public Map<String, String> getClasses() {
-        Map<String, String> result = new HashMap<String, String>();
+        Map<String, String> result = new HashMap<>();
         for (Map.Entry<String, StringWriter> e : classBodies.entrySet()) {
             result.put(e.getKey(), e.getValue().toString());
         }
@@ -125,7 +125,7 @@
     }
 
     public Map<String, String> getResources() {
-        Map<String, String> result = new HashMap<String, String>();
+        Map<String, String> result = new HashMap<>();
         for (Map.Entry<String, StringWriter> e : resourceBodies.entrySet()) {
             result.put(e.getKey(), e.getValue().toString());
         }
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/bulkwarmup/NonForkedModesTest.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/bulkwarmup/NonForkedModesTest.java	Wed Nov 16 11:40:00 2016 +0100
@@ -48,7 +48,7 @@
 @State(Scope.Thread)
 public class NonForkedModesTest {
 
-    private static Queue<String> testSequence = new ConcurrentLinkedQueue<String>();
+    private static Queue<String> testSequence = new ConcurrentLinkedQueue<>();
 
     boolean recorded;
 
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/bulkwarmup/WarmupMode0_Test.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/bulkwarmup/WarmupMode0_Test.java	Wed Nov 16 11:40:00 2016 +0100
@@ -54,7 +54,7 @@
 @State(Scope.Thread)
 public class WarmupMode0_Test {
 
-    private static Queue<String> testSequence = new ConcurrentLinkedQueue<String>();
+    private static Queue<String> testSequence = new ConcurrentLinkedQueue<>();
 
     boolean recorded;
 
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/bulkwarmup/WarmupMode1_Test.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/bulkwarmup/WarmupMode1_Test.java	Wed Nov 16 11:40:00 2016 +0100
@@ -54,7 +54,7 @@
 @State(Scope.Thread)
 public class WarmupMode1_Test {
 
-    private static Queue<String> testSequence = new ConcurrentLinkedQueue<String>();
+    private static Queue<String> testSequence = new ConcurrentLinkedQueue<>();
 
     boolean recorded;
 
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/bulkwarmup/WarmupMode2_Test.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/bulkwarmup/WarmupMode2_Test.java	Wed Nov 16 11:40:00 2016 +0100
@@ -54,7 +54,7 @@
 @State(Scope.Thread)
 public class WarmupMode2_Test {
 
-    private static Queue<String> testSequence = new ConcurrentLinkedQueue<String>();
+    private static Queue<String> testSequence = new ConcurrentLinkedQueue<>();
 
     boolean recorded;
 
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/bulkwarmup/WarmupMode3_Test.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/bulkwarmup/WarmupMode3_Test.java	Wed Nov 16 11:40:00 2016 +0100
@@ -54,7 +54,7 @@
 @State(Scope.Thread)
 public class WarmupMode3_Test {
 
-    private static Queue<String> testSequence = new ConcurrentLinkedQueue<String>();
+    private static Queue<String> testSequence = new ConcurrentLinkedQueue<>();
 
     boolean recorded;
 
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/bulkwarmup/WarmupMode4_Test.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/bulkwarmup/WarmupMode4_Test.java	Wed Nov 16 11:40:00 2016 +0100
@@ -54,7 +54,7 @@
 @State(Scope.Thread)
 public class WarmupMode4_Test {
 
-    private static Queue<String> testSequence = new ConcurrentLinkedQueue<String>();
+    private static Queue<String> testSequence = new ConcurrentLinkedQueue<>();
 
     boolean recorded;
 
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/bulkwarmup/WarmupMode5_Test.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/bulkwarmup/WarmupMode5_Test.java	Wed Nov 16 11:40:00 2016 +0100
@@ -55,7 +55,7 @@
 @State(Scope.Thread)
 public class WarmupMode5_Test {
 
-    private static Queue<String> testSequence = new ConcurrentLinkedQueue<String>();
+    private static Queue<String> testSequence = new ConcurrentLinkedQueue<>();
 
     boolean recorded;
 
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/bulkwarmup/WarmupMode6_Test.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/bulkwarmup/WarmupMode6_Test.java	Wed Nov 16 11:40:00 2016 +0100
@@ -55,7 +55,7 @@
 @State(Scope.Thread)
 public class WarmupMode6_Test {
 
-    private static Queue<String> testSequence = new ConcurrentLinkedQueue<String>();
+    private static Queue<String> testSequence = new ConcurrentLinkedQueue<>();
 
     boolean recorded;
 
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/ccontrol/LogConsumeProfiler.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/ccontrol/LogConsumeProfiler.java	Wed Nov 16 11:40:00 2016 +0100
@@ -107,7 +107,7 @@
             @Override
             public LogConsumeResult aggregate(Collection<LogConsumeResult> results) {
                 String label = null;
-                Collection<String> allLines = new ArrayList<String>();
+                Collection<String> allLines = new ArrayList<>();
                 for (LogConsumeResult r : results) {
                     label = r.label;
                     allLines.addAll(r.getLines());
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/params/EmptyLeadingStringParamTest.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/params/EmptyLeadingStringParamTest.java	Wed Nov 16 11:40:00 2016 +0100
@@ -62,7 +62,7 @@
 
         Collection<RunResult> res = new Runner(opts).run();
 
-        Set<String> actualP = new HashSet<String>();
+        Set<String> actualP = new HashSet<>();
         for (RunResult r : res) {
             actualP.add(r.getParams().getParam("x"));
         }
@@ -83,7 +83,7 @@
 
         Collection<RunResult> res = new Runner(opts).run();
 
-        Set<String> actualP = new HashSet<String>();
+        Set<String> actualP = new HashSet<>();
         for (RunResult r : res) {
             actualP.add(r.getParams().getParam("x"));
         }
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/params/EmptyMiddleStringParamTest.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/params/EmptyMiddleStringParamTest.java	Wed Nov 16 11:40:00 2016 +0100
@@ -62,7 +62,7 @@
 
         Collection<RunResult> res = new Runner(opts).run();
 
-        Set<String> actualP = new HashSet<String>();
+        Set<String> actualP = new HashSet<>();
         for (RunResult r : res) {
             actualP.add(r.getParams().getParam("x"));
         }
@@ -84,7 +84,7 @@
 
         Collection<RunResult> res = new Runner(opts).run();
 
-        Set<String> actualP = new HashSet<String>();
+        Set<String> actualP = new HashSet<>();
         for (RunResult r : res) {
             actualP.add(r.getParams().getParam("x"));
         }
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/params/EmptyTrailingStringParamTest.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/params/EmptyTrailingStringParamTest.java	Wed Nov 16 11:40:00 2016 +0100
@@ -62,7 +62,7 @@
 
         Collection<RunResult> res = new Runner(opts).run();
 
-        Set<String> actualP = new HashSet<String>();
+        Set<String> actualP = new HashSet<>();
         for (RunResult r : res) {
             actualP.add(r.getParams().getParam("x"));
         }
@@ -83,7 +83,7 @@
 
         Collection<RunResult> res = new Runner(opts).run();
 
-        Set<String> actualP = new HashSet<String>();
+        Set<String> actualP = new HashSet<>();
         for (RunResult r : res) {
             actualP.add(r.getParams().getParam("x"));
         }
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/params/Shared.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/params/Shared.java	Wed Nov 16 11:40:00 2016 +0100
@@ -35,7 +35,7 @@
 public class Shared {
 
     public static void compare(Collection<RunResult> res, int[] xs, String[] ys) {
-        Set<String> actualPairs = new HashSet<String>();
+        Set<String> actualPairs = new HashSet<>();
         for (RunResult r : res) {
             BenchmarkParams params = r.getParams();
             actualPairs.add(params.getParam("x") + params.getParam("y"));
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/profilers/ChangeJVMOptsTest.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/profilers/ChangeJVMOptsTest.java	Wed Nov 16 11:40:00 2016 +0100
@@ -94,7 +94,7 @@
     }
 
     private void check() throws IOException {
-        Set<String> lines = new HashSet<String>();
+        Set<String> lines = new HashSet<>();
         for (String line : FileUtils.readAllLines(TMP_FILE)) {
             if (!lines.add(line)) {
                 Assert.fail("Duplicate line: " + line);
--- a/jmh-core/src/main/java/org/openjdk/jmh/annotations/Mode.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/annotations/Mode.java	Wed Nov 16 11:40:00 2016 +0100
@@ -128,7 +128,7 @@
     }
 
     public static List<String> getKnown() {
-        List<String> res = new ArrayList<String>();
+        List<String> res = new ArrayList<>();
         for (Mode type : Mode.values()) {
             res.add(type.name() + "/" + type.shortLabel());
         }
--- a/jmh-core/src/main/java/org/openjdk/jmh/generators/core/BenchmarkGenerator.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/generators/core/BenchmarkGenerator.java	Wed Nov 16 11:40:00 2016 +0100
@@ -59,8 +59,8 @@
     private final BenchmarkGeneratorSession session;
 
     public BenchmarkGenerator() {
-        benchmarkInfos = new HashSet<BenchmarkInfo>();
-        processedBenchmarks = new HashSet<String>();
+        benchmarkInfos = new HashSet<>();
+        processedBenchmarks = new HashSet<>();
         compilerControl = new CompilerControlPlugin();
         session = new BenchmarkGeneratorSession();
     }
@@ -123,14 +123,14 @@
 
         // Processing completed, final round.
         // Collect all benchmark entries here
-        Set<BenchmarkListEntry> entries = new HashSet<BenchmarkListEntry>();
+        Set<BenchmarkListEntry> entries = new HashSet<>();
 
         // Try to read the benchmark entries from the previous generator sessions.
         // Incremental compilation may add or remove @Benchmark entries. New entries
         // are discovered and added from the current compilation session. It is harder
         // to detect removed @Benchmark entries. To do so, we are overwriting all benchmark
         // records that belong to a current compilation unit.
-        Multimap<String, BenchmarkListEntry> entriesByQName = new HashMultimap<String, BenchmarkListEntry>();
+        Multimap<String, BenchmarkListEntry> entriesByQName = new HashMultimap<>();
         try {
             for (String line : readBenchmarkList(destination)) {
                 BenchmarkListEntry br = new BenchmarkListEntry(line);
@@ -227,7 +227,7 @@
         //   We skip the generated classes, which we had probably generated during the previous rounds
         //   of processing. Abstract classes are of no interest for us either.
 
-        Multimap<ClassInfo, MethodInfo> result = new HashMultimap<ClassInfo, MethodInfo>();
+        Multimap<ClassInfo, MethodInfo> result = new HashMultimap<>();
         for (ClassInfo currentClass : source.getClasses()) {
             if (currentClass.getQualifiedName().contains("generated")) continue;
             if (currentClass.isAbstract()) continue;
@@ -402,7 +402,7 @@
      * @return BenchmarkInfo
      */
     private Collection<BenchmarkInfo> makeBenchmarkInfo(ClassInfo clazz, Collection<MethodInfo> methods) {
-        Map<String, MethodGroup> result = new TreeMap<String, MethodGroup>();
+        Map<String, MethodGroup> result = new TreeMap<>();
 
         for (MethodInfo method : methods) {
             Group groupAnn = method.getAnnotation(Group.class);
@@ -445,7 +445,7 @@
             }
         }
 
-        Collection<BenchmarkInfo> benchmarks = new ArrayList<BenchmarkInfo>();
+        Collection<BenchmarkInfo> benchmarks = new ArrayList<>();
         for (MethodGroup group : result.values()) {
             String sourcePackage = clazz.getPackageName();
             String generatedPackageName = sourcePackage + ".generated";
--- a/jmh-core/src/main/java/org/openjdk/jmh/generators/core/BenchmarkGeneratorSession.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/generators/core/BenchmarkGeneratorSession.java	Wed Nov 16 11:40:00 2016 +0100
@@ -28,5 +28,5 @@
 import java.util.Set;
 
 public class BenchmarkGeneratorSession {
-    public final Set<String> generatedStateOverrides = new HashSet<String>();
+    public final Set<String> generatedStateOverrides = new HashSet<>();
 }
--- a/jmh-core/src/main/java/org/openjdk/jmh/generators/core/BenchmarkGeneratorUtils.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/generators/core/BenchmarkGeneratorUtils.java	Wed Nov 16 11:40:00 2016 +0100
@@ -65,7 +65,7 @@
                 State.class, TearDown.class, Threads.class, Warmup.class
         );
 
-        JMH_ANNOTATION_TARGETS = new HashMultimap<Class<? extends Annotation>, ElementType>();
+        JMH_ANNOTATION_TARGETS = new HashMultimap<>();
 
         for (Class<? extends Annotation> ann : JMH_ANNOTATIONS) {
             Target target = ann.getAnnotation(Target.class);
@@ -89,7 +89,7 @@
     }
 
     public static <T extends Annotation> Collection<MethodInfo> getMethodsAnnotatedWith(GeneratorSource source, Class<T> annClass) {
-        List<MethodInfo> mis = new ArrayList<MethodInfo>();
+        List<MethodInfo> mis = new ArrayList<>();
         for (ClassInfo ci : source.getClasses()) {
             for (MethodInfo mi : ci.getMethods()) {
                 if (mi.getAnnotation(annClass) != null) {
@@ -101,7 +101,7 @@
     }
 
     public static <T extends Annotation> Collection<ClassInfo> getClassesAnnotatedWith(GeneratorSource source, Class<T> annClass) {
-        List<ClassInfo> cis = new ArrayList<ClassInfo>();
+        List<ClassInfo> cis = new ArrayList<>();
         for (ClassInfo ci : source.getClasses()) {
             if (ci.getAnnotation(annClass) != null) {
                 cis.add(ci);
@@ -111,7 +111,7 @@
     }
 
     public static <T extends Annotation> Collection<FieldInfo> getFieldsAnnotatedWith(GeneratorSource source, Class<T> annClass) {
-        List<FieldInfo> mis = new ArrayList<FieldInfo>();
+        List<FieldInfo> mis = new ArrayList<>();
         for (ClassInfo ci : source.getClasses()) {
             for (FieldInfo mi : ci.getFields()) {
                 if (mi.getAnnotation(annClass) != null) {
@@ -123,7 +123,7 @@
     }
 
     public static Collection<FieldInfo> getAllFields(ClassInfo ci) {
-        List<FieldInfo> ls = new ArrayList<FieldInfo>();
+        List<FieldInfo> ls = new ArrayList<>();
         do {
             ls.addAll(ci.getFields());
         } while ((ci = ci.getSuperClass()) != null);
@@ -131,7 +131,7 @@
     }
 
     public static Collection<MethodInfo> getAllMethods(ClassInfo ci) {
-        List<MethodInfo> ls = new ArrayList<MethodInfo>();
+        List<MethodInfo> ls = new ArrayList<>();
         do {
             ls.addAll(ci.getMethods());
         } while ((ci = ci.getSuperClass()) != null);
@@ -139,7 +139,7 @@
     }
 
     public static Collection<MethodInfo> getMethods(ClassInfo ci) {
-        List<MethodInfo> ls = new ArrayList<MethodInfo>();
+        List<MethodInfo> ls = new ArrayList<>();
         do {
             ls.addAll(ci.getMethods());
         } while ((ci = ci.getSuperClass()) != null);
@@ -200,7 +200,7 @@
     }
 
     public static <T extends Annotation> Collection<T> getAnnSuperAll(MethodInfo mi, ClassInfo startCi, Class<T> annClass) {
-        Collection<T> results = new ArrayList<T>();
+        Collection<T> results = new ArrayList<>();
         {
             T ann = mi.getAnnotation(annClass);
             if (ann != null) {
--- a/jmh-core/src/main/java/org/openjdk/jmh/generators/core/CompilerControlPlugin.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/generators/core/CompilerControlPlugin.java	Wed Nov 16 11:40:00 2016 +0100
@@ -36,16 +36,16 @@
 
 class CompilerControlPlugin {
 
-    private final SortedSet<String> lines = new TreeSet<String>();
+    private final SortedSet<String> lines = new TreeSet<>();
 
-    private final Set<MethodInfo> defaultForceInlineMethods = new TreeSet<MethodInfo>(new Comparator<MethodInfo>() {
+    private final Set<MethodInfo> defaultForceInlineMethods = new TreeSet<>(new Comparator<MethodInfo>() {
         @Override
         public int compare(MethodInfo o1, MethodInfo o2) {
             return o1.getQualifiedName().compareTo(o2.getQualifiedName());
         }
     });
 
-    private final Set<String> alwaysDontInlineMethods = new TreeSet<String>();
+    private final Set<String> alwaysDontInlineMethods = new TreeSet<>();
 
     public void defaultForceInline(MethodInfo methodInfo) {
         defaultForceInlineMethods.add(methodInfo);
--- a/jmh-core/src/main/java/org/openjdk/jmh/generators/core/FileSystemDestination.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/generators/core/FileSystemDestination.java	Wed Nov 16 11:40:00 2016 +0100
@@ -44,8 +44,8 @@
     public FileSystemDestination(File resourceDir, File sourceDir) {
         this.resourceDir = resourceDir;
         this.sourceDir = sourceDir;
-        this.sourceErrors = new ArrayList<SourceError>();
-        this.sourceWarnings = new ArrayList<SourceWarning>();
+        this.sourceErrors = new ArrayList<>();
+        this.sourceWarnings = new ArrayList<>();
     }
 
     @Override
--- a/jmh-core/src/main/java/org/openjdk/jmh/generators/core/Identifiers.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/generators/core/Identifiers.java	Wed Nov 16 11:40:00 2016 +0100
@@ -33,11 +33,11 @@
 
 class Identifiers {
 
-    private final Map<String, String> collapsedTypes = new HashMap<String, String>();
+    private final Map<String, String> collapsedTypes = new HashMap<>();
     private int collapsedIndex = 0;
 
-    private final Set<String> claimedJmhTypes = new HashSet<String>();
-    private final Map<String, String> jmhTypes = new HashMap<String, String>();
+    private final Set<String> claimedJmhTypes = new HashSet<>();
+    private final Map<String, String> jmhTypes = new HashMap<>();
 
     public String getJMHtype(ClassInfo type) {
         String id = BenchmarkGeneratorUtils.getGeneratedName(type);
--- a/jmh-core/src/main/java/org/openjdk/jmh/generators/core/MethodGroup.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/generators/core/MethodGroup.java	Wed Nov 16 11:40:00 2016 +0100
@@ -43,9 +43,9 @@
     public MethodGroup(ClassInfo ci, String name) {
         this.ci = ci;
         this.name = name;
-        this.methods = new TreeMap<MethodInvocation, MethodInvocation>();
+        this.methods = new TreeMap<>();
         this.modes = EnumSet.noneOf(Mode.class);
-        this.params = new TreeMap<String, String[]>();
+        this.params = new TreeMap<>();
     }
 
     @Override
@@ -84,7 +84,7 @@
     }
 
     public Collection<MethodInfo> methods() {
-        Collection<MethodInfo> result = new ArrayList<MethodInfo>();
+        Collection<MethodInfo> result = new ArrayList<>();
         for (MethodInvocation m : methods.keySet()) {
             result.add(m.method);
         }
@@ -139,7 +139,7 @@
 
     public Optional<Collection<String>> getGroupLabels() {
         if (methods.size() > 1) {
-            Collection<String> labels = new ArrayList<String>();
+            Collection<String> labels = new ArrayList<>();
             for (MethodInvocation mi : methods.keySet()) {
                 labels.add(mi.method.getName());
             }
@@ -282,7 +282,7 @@
     }
 
     private <T extends Annotation> Collection<T> getAll(Class<T> annClass) {
-        Collection<T> results = new ArrayList<T>();
+        Collection<T> results = new ArrayList<>();
         for (MethodInvocation mi : methods.keySet()) {
             Collection<T> anns = BenchmarkGeneratorUtils.getAnnSuperAll(mi.method, ci, annClass);
             if (!(results.isEmpty() || anns.isEmpty() || results.equals(anns))) {
@@ -294,7 +294,7 @@
     }
 
     public Optional<Map<String, String[]>> getParams() {
-        Map<String, String[]> map = new TreeMap<String, String[]>();
+        Map<String, String[]> map = new TreeMap<>();
 
         for (Map.Entry<String, String[]> e : params.entrySet()) {
             String key = e.getKey();
--- a/jmh-core/src/main/java/org/openjdk/jmh/generators/core/Paddings.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/generators/core/Paddings.java	Wed Nov 16 11:40:00 2016 +0100
@@ -33,7 +33,7 @@
     private static final List<String> PADDING_CACHE;
 
     static {
-        PADDING_CACHE = new ArrayList<String>();
+        PADDING_CACHE = new ArrayList<>();
         for (int p = 0; p < 16; p++) {
             StringBuilder sb = new StringBuilder();
             sb.append("    ");
--- a/jmh-core/src/main/java/org/openjdk/jmh/generators/core/StateObject.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/generators/core/StateObject.java	Wed Nov 16 11:40:00 2016 +0100
@@ -61,10 +61,10 @@
         this.localIdentifier = "l_" + id;
         this.fieldIdentifier = "f_" + id;
 
-        this.params = new TreeMultimap<String, FieldInfo>();
-        this.helpers = new TreeSet<HelperMethodInvocation>();
-        this.helperArgs = new HashMultimap<String, String>();
-        this.depends = new ArrayList<StateObject>();
+        this.params = new TreeMultimap<>();
+        this.helpers = new TreeSet<>();
+        this.helperArgs = new HashMultimap<>();
+        this.depends = new ArrayList<>();
     }
 
     @Override
--- a/jmh-core/src/main/java/org/openjdk/jmh/generators/core/StateObjectHandler.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/generators/core/StateObjectHandler.java	Wed Nov 16 11:40:00 2016 +0100
@@ -52,18 +52,18 @@
 
     private final Multimap<String, String> benchmarkArgs;
 
-    private final Multimap<String, String> auxNames = new HashMultimap<String, String>();
-    private final Map<String, AuxCounters.Type> auxType = new HashMap<String, AuxCounters.Type>();
-    private final Map<String, String> auxAccessors = new HashMap<String, String>();
-    private final Map<String, Boolean> auxResettable = new HashMap<String, Boolean>();
+    private final Multimap<String, String> auxNames = new HashMultimap<>();
+    private final Map<String, AuxCounters.Type> auxType = new HashMap<>();
+    private final Map<String, String> auxAccessors = new HashMap<>();
+    private final Map<String, Boolean> auxResettable = new HashMap<>();
 
     public StateObjectHandler(CompilerControlPlugin compileControl) {
         this.compileControl = compileControl;
-        this.roots = new HashMultimap<String, StateObject>();
-        this.benchmarkArgs = new HashMultimap<String, String>();
-        this.implicits = new HashMap<String, StateObject>();
-        this.specials = new HashMultimap<String, ClassInfo>();
-        this.stateObjects = new HashSet<StateObject>();
+        this.roots = new HashMultimap<>();
+        this.benchmarkArgs = new HashMultimap<>();
+        this.implicits = new HashMap<>();
+        this.specials = new HashMultimap<>();
+        this.stateObjects = new HashSet<>();
         this.identifiers = new Identifiers();
     }
 
@@ -225,7 +225,7 @@
     }
 
     private static void validateNoCyclesStep(List<String> states, MethodInfo method, boolean includeHolder) {
-        List<ClassInfo> stratum = new ArrayList<ClassInfo>();
+        List<ClassInfo> stratum = new ArrayList<>();
         if (includeHolder) {
             stratum.add(method.getDeclaringClass());
         }
@@ -233,7 +233,7 @@
             stratum.add(ppi.getType());
         }
 
-        List<String> newStates = new ArrayList<String>();
+        List<String> newStates = new ArrayList<>();
         newStates.addAll(states);
         for (ClassInfo ci : stratum) {
             newStates.add(ci.getQualifiedName());
@@ -551,8 +551,9 @@
         return sb.toString();
     }
 
+    @SafeVarargs
     public static Collection<StateObject> cons(Collection<StateObject>... colls) {
-        SortedSet<StateObject> r = new TreeSet<StateObject>(StateObject.ID_COMPARATOR);
+        SortedSet<StateObject> r = new TreeSet<>(StateObject.ID_COMPARATOR);
         for (Collection<StateObject> coll : colls) {
             r.addAll(coll);
         }
@@ -563,7 +564,7 @@
 
         // Look for the offending methods.
         // This will be used to skip the irrelevant blocks for state objects down the stream.
-        List<StateObject> statesForward = new ArrayList<StateObject>();
+        List<StateObject> statesForward = new ArrayList<>();
         for (StateObject so : stateOrder(method, true)) {
             for (HelperMethodInvocation hmi : so.getHelpers()) {
                 if (hmi.helperLevel == helperLevel) {
@@ -573,7 +574,7 @@
             }
         }
 
-        List<StateObject> statesReverse = new ArrayList<StateObject>();
+        List<StateObject> statesReverse = new ArrayList<>();
         for (StateObject so : stateOrder(method, false)) {
             for (HelperMethodInvocation hmi : so.getHelpers()) {
                 if (hmi.helperLevel == helperLevel) {
@@ -583,7 +584,7 @@
             }
         }
 
-        List<String> result = new ArrayList<String>();
+        List<String> result = new ArrayList<>();
 
         // Handle Thread object helpers
         for (StateObject so : statesForward) {
@@ -723,7 +724,7 @@
     public List<String> getStateInitializers() {
         Collection<StateObject> sos = cons(stateObjects);
 
-        List<String> result = new ArrayList<String>();
+        List<String> result = new ArrayList<>();
 
         for (StateObject so : sos) {
             if (so.scope != Scope.Benchmark) continue;
@@ -865,7 +866,7 @@
     public Collection<String> getStateDestructors(MethodInfo method) {
         Collection<StateObject> sos = stateOrder(method, false);
 
-        List<String> result = new ArrayList<String>();
+        List<String> result = new ArrayList<>();
         for (StateObject so : sos) {
             if (so.scope != Scope.Benchmark) continue;
             result.add("synchronized(this.getClass()) {");
@@ -888,7 +889,7 @@
     }
 
     public List<String> getStateGetters(MethodInfo method) {
-        List<String> result = new ArrayList<String>();
+        List<String> result = new ArrayList<>();
         for (StateObject so : stateOrder(method, true)) {
             result.add(so.type + " " + so.localIdentifier + " = _jmh_tryInit_" + so.fieldIdentifier + "(control" + soDependency_Args(so) + ");");
         }
@@ -897,9 +898,9 @@
 
     private LinkedHashSet<StateObject> stateOrder(MethodInfo method, boolean reverse) {
         // Linearize @State dependency DAG
-        List<StateObject> linearOrder = new ArrayList<StateObject>();
+        List<StateObject> linearOrder = new ArrayList<>();
 
-        List<StateObject> stratum = new ArrayList<StateObject>();
+        List<StateObject> stratum = new ArrayList<>();
 
         // These are roots
         stratum.addAll(roots.get(method.getName()));
@@ -908,7 +909,7 @@
         // Recursively walk the DAG
         while (!stratum.isEmpty()) {
             linearOrder.addAll(stratum);
-            List<StateObject> newStratum = new ArrayList<StateObject>();
+            List<StateObject> newStratum = new ArrayList<>();
             for (StateObject so : stratum) {
                 newStratum.addAll(so.depends);
             }
@@ -919,7 +920,7 @@
             Collections.reverse(linearOrder);
         }
 
-        return new LinkedHashSet<StateObject>(linearOrder);
+        return new LinkedHashSet<>(linearOrder);
     }
 
     public void writeStateOverrides(BenchmarkGeneratorSession sess, GeneratorDestination dst) throws IOException {
@@ -1019,7 +1020,7 @@
     }
 
     public Collection<String> getAuxResets(MethodInfo method) {
-        Collection<String> result = new ArrayList<String>();
+        Collection<String> result = new ArrayList<>();
         for (String name : auxNames.get(method.getName())) {
             if (auxResettable.get(name)) {
                 result.add(auxAccessors.get(method.getName() + name) + " = 0;");
@@ -1029,7 +1030,7 @@
     }
 
     public Collection<String> getAuxResults(MethodInfo method, String opResName) {
-        Collection<String> result = new ArrayList<String>();
+        Collection<String> result = new ArrayList<>();
         for (String ops : auxNames.get(method.getName())) {
             AuxCounters.Type type = auxType.get(ops);
             switch (type) {
--- a/jmh-core/src/main/java/org/openjdk/jmh/profile/AbstractHotspotProfiler.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/profile/AbstractHotspotProfiler.java	Wed Nov 16 11:40:00 2016 +0100
@@ -53,7 +53,7 @@
     @Override
     public Collection<? extends Result> afterIteration(BenchmarkParams benchmarkParams, IterationParams iterationParams, IterationResult result) {
         HotspotInternalResult res = counters();
-        Collection<ScalarResult> results = new ArrayList<ScalarResult>();
+        Collection<ScalarResult> results = new ArrayList<>();
         for (Map.Entry<String, Long> e : res.getDiff().entrySet()) {
             results.add(new ScalarResult(Defaults.PREFIX + e.getKey(), e.getValue(), "?", AggregationPolicy.AVG));
         }
@@ -62,7 +62,7 @@
 
     @Override
     public void beforeIteration(BenchmarkParams benchmarkParams, IterationParams iterationParams) {
-        prevs = new HashMap<String, Long>();
+        prevs = new HashMap<>();
         for (Counter counter : getCounters()) {
             prevs.put(counter.getName(), convert(counter.getValue()));
         }
@@ -77,8 +77,8 @@
     }
 
     protected HotspotInternalResult counters() {
-        Map<String, Long> difference = new TreeMap<String, Long>();
-        Map<String, Long> current = new TreeMap<String, Long>();
+        Map<String, Long> difference = new TreeMap<>();
+        Map<String, Long> current = new TreeMap<>();
         for (Counter counter : getCounters()) {
             Long prev = prevs.get(counter.getName());
             if (prev != null) {
@@ -95,13 +95,7 @@
         try {
             Object o = Class.forName("sun.management.ManagementFactoryHelper").getMethod("get" + name).invoke(null);
             return (T) o;
-        } catch (ClassNotFoundException e) {
-            throw new IllegalStateException("Should not be here");
-        } catch (InvocationTargetException e) {
-            throw new IllegalStateException("Should not be here");
-        } catch (NoSuchMethodException e) {
-            throw new IllegalStateException("Should not be here");
-        } catch (IllegalAccessException e) {
+        } catch (ClassNotFoundException | IllegalAccessException | NoSuchMethodException | InvocationTargetException e) {
             throw new IllegalStateException("Should not be here");
         }
     }
--- a/jmh-core/src/main/java/org/openjdk/jmh/profile/AbstractPerfAsmProfiler.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/profile/AbstractPerfAsmProfiler.java	Wed Nov 16 11:40:00 2016 +0100
@@ -228,7 +228,7 @@
     @Override
     public Collection<String> addJVMOptions(BenchmarkParams params) {
         if (!skipAssembly) {
-            Collection<String> opts = new ArrayList<String>();
+            Collection<String> opts = new ArrayList<>();
             opts.addAll(Arrays.asList(
                 "-XX:+UnlockDiagnosticVMOptions",
                 "-XX:+LogCompilation",
@@ -429,8 +429,8 @@
          * 6. Print out the hottest regions
          */
         {
-            Multiset<String> total = new HashMultiset<String>();
-            Multiset<String> other = new HashMultiset<String>();
+            Multiset<String> total = new HashMultiset<>();
+            Multiset<String> other = new HashMultiset<>();
 
             printDottedLine(pw, "Hottest Regions");
             int shown = 0;
@@ -465,8 +465,8 @@
             pw.println();
         }
 
-        final Map<String, Multiset<String>> methodsByType = new HashMap<String, Multiset<String>>();
-        final Map<String, Multiset<MethodDesc>> methods = new HashMap<String, Multiset<MethodDesc>>();
+        final Map<String, Multiset<String>> methodsByType = new HashMap<>();
+        final Map<String, Multiset<MethodDesc>> methods = new HashMap<>();
 
         for (String event : this.events) {
             methodsByType.put(event, new HashMultiset<String>());
@@ -487,8 +487,8 @@
         {
             printDottedLine(pw, "Hottest Methods (after inlining)");
 
-            Multiset<String> total = new HashMultiset<String>();
-            Multiset<String> other = new HashMultiset<String>();
+            Multiset<String> total = new HashMultiset<>();
+            Multiset<String> other = new HashMultiset<>();
 
             int shownMethods = 0;
             List<MethodDesc> top = Multisets.sortedDesc(methods.get(mainEvent));
@@ -552,7 +552,7 @@
          */
 
         {
-            Set<Long> addrHistory = new HashSet<Long>();
+            Set<Long> addrHistory = new HashSet<>();
             for (Long addr : assembly.addressMap.keySet()) {
                 if (!addrHistory.add(addr)) {
                     pw.println("WARNING: Duplicate instruction addresses detected. This is probably due to compiler reusing\n " +
@@ -668,7 +668,7 @@
     }
 
     List<Region> makeRegions(Assembly asms, PerfEvents events) {
-        List<Region> regions = new ArrayList<Region>();
+        List<Region> regions = new ArrayList<>();
 
         SortedSet<Long> allAddrs = events.getAllAddresses();
         for (Interval intv : figureHotIntervals(allAddrs, allAddrs.first(), allAddrs.last())) {
@@ -705,7 +705,7 @@
 
 
     private List<Interval> figureHotIntervals(SortedSet<Long> allAddrs, long from, long to) {
-        List<Interval> intervals = new ArrayList<Interval>();
+        List<Interval> intervals = new ArrayList<>();
         SortedSet<Long> addrs = allAddrs.subSet(from, to);
 
         long begAddr = addrs.first();
@@ -728,7 +728,7 @@
     Collection<Collection<String>> splitAssembly(File stdOut) {
         FileReader in = null;
         try {
-            Multimap<Long, String> writerToLines = new HashMultimap<Long, String>();
+            Multimap<Long, String> writerToLines = new HashMultimap<>();
             Long writerId = -1L;
 
             Pattern pWriterThread = Pattern.compile("(.*)<writer thread='(.*)'>(.*)");
@@ -753,7 +753,7 @@
                 writerToLines.put(writerId, line);
             }
 
-            Collection<Collection<String>> r = new ArrayList<Collection<String>>();
+            Collection<Collection<String>> r = new ArrayList<>();
             for (long id : writerToLines.keys()) {
                 r.add(writerToLines.get(id));
             }
@@ -766,13 +766,13 @@
     }
 
     Assembly readAssembly(File stdOut) {
-        List<ASMLine> lines = new ArrayList<ASMLine>();
-        SortedMap<Long, Integer> addressMap = new TreeMap<Long, Integer>();
+        List<ASMLine> lines = new ArrayList<>();
+        SortedMap<Long, Integer> addressMap = new TreeMap<>();
 
-        IntervalMap<MethodDesc> stubs       = new IntervalMap<MethodDesc>();
-        IntervalMap<MethodDesc> javaMethods = new IntervalMap<MethodDesc>();
+        IntervalMap<MethodDesc> stubs       = new IntervalMap<>();
+        IntervalMap<MethodDesc> javaMethods = new IntervalMap<>();
 
-        Set<Interval> intervals = new HashSet<Interval>();
+        Set<Interval> intervals = new HashSet<>();
 
         for (Collection<String> cs : splitAssembly(stdOut)) {
             String prevLine = "";
@@ -845,7 +845,7 @@
                         body = body.replaceAll("='", "=");
                         String[] kvs = body.split("' ");
 
-                        HashMap<String, String> map = new HashMap<String, String>();
+                        HashMap<String, String> map = new HashMap<>();
                         for (String kv : kvs) {
                             String[] pair = kv.split("=");
                             map.put(pair[0], pair[1]);
@@ -869,7 +869,7 @@
         }
 
         // Important to get the order right: all Java methods take precedence over interpreter/runtime stubs.
-        IntervalMap<MethodDesc> methodMap = new IntervalMap<MethodDesc>();
+        IntervalMap<MethodDesc> methodMap = new IntervalMap<>();
         methodMap.merge(stubs);
         methodMap.merge(javaMethods);
 
@@ -930,7 +930,7 @@
         PerfEvents(Collection<String> tracedEvents, Map<String, Multiset<Long>> events, IntervalMap<MethodDesc> methods) {
             this.events = events;
             this.methods = methods;
-            this.totalCounts = new HashMap<String, Long>();
+            this.totalCounts = new HashMap<>();
             for (String event : tracedEvents) {
                 totalCounts.put(event, events.get(event).size());
             }
@@ -949,7 +949,7 @@
         }
 
         public SortedSet<Long> getAllAddresses() {
-            SortedSet<Long> addrs = new TreeSet<Long>();
+            SortedSet<Long> addrs = new TreeSet<>();
             for (Multiset<Long> e : events.values()) {
                 addrs.addAll(e.keys());
             }
@@ -1048,7 +1048,7 @@
             this.begin = begin;
             this.end = end;
             this.eventfulAddrs = eventfulAddrs;
-            this.eventCountCache = new HashMap<String, Long>();
+            this.eventCountCache = new HashMap<>();
         }
 
         long getEventCount(PerfEvents events, String event) {
@@ -1107,8 +1107,8 @@
                     }
                 }
 
-                Set<Interval> interIvs = new TreeSet<Interval>();
-                Set<Interval> intraIvs = new TreeSet<Interval>();
+                Set<Interval> interIvs = new TreeSet<>();
+                Set<Interval> intraIvs = new TreeSet<>();
 
                 for (Interval it : asms.intervals) {
                     boolean srcInline = (beginLine < it.src && it.src < endLine);
--- a/jmh-core/src/main/java/org/openjdk/jmh/profile/ClassloaderProfiler.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/profile/ClassloaderProfiler.java	Wed Nov 16 11:40:00 2016 +0100
@@ -69,7 +69,7 @@
     public Collection<? extends Result> afterIteration(BenchmarkParams benchmarkParams, IterationParams iterationParams, IterationResult result) {
         afterTime = System.nanoTime();
 
-        List<Result> results = new ArrayList<Result>();
+        List<Result> results = new ArrayList<>();
 
         ClassLoadingMXBean cl = ManagementFactory.getClassLoadingMXBean();
 
--- a/jmh-core/src/main/java/org/openjdk/jmh/profile/GCProfiler.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/profile/GCProfiler.java	Wed Nov 16 11:40:00 2016 +0100
@@ -84,7 +84,7 @@
             gcTime += bean.getCollectionTime();
         }
 
-        List<ScalarResult> results = new ArrayList<ScalarResult>();
+        List<ScalarResult> results = new ArrayList<>();
 
         if (beforeAllocated == HotspotAllocationSnapshot.EMPTY) {
             // When allocation profiling fails, make sure it is distinguishable in report
@@ -171,7 +171,7 @@
          * @return estimated number of allocated bytes between profiler calls
          */
         public long subtract(HotspotAllocationSnapshot other) {
-            HashMap<Long, Integer> prevIndex = new HashMap<Long, Integer>();
+            HashMap<Long, Integer> prevIndex = new HashMap<>();
             for (int i = 0; i < other.threadIds.length; i++) {
                 long id = other.threadIds[i];
                 prevIndex.put(id, i);
@@ -254,15 +254,13 @@
         private static long[] getAllocatedBytes(long[] threadIds) {
             try {
                 return (long[]) ALLOC_MX_BEAN_GETTER.invoke(ALLOC_MX_BEAN, (Object) threadIds);
-            } catch (InvocationTargetException e) {
-                throw new IllegalStateException(e);
-            } catch (IllegalAccessException e) {
+            } catch (InvocationTargetException | IllegalAccessException e) {
                 throw new IllegalStateException(e);
             }
         }
 
         private static NotificationListener newListener() {
-            churn = new HashMultiset<String>();
+            churn = new HashMultiset<>();
             try {
                 final Class<?> infoKlass = Class.forName("com.sun.management.GarbageCollectionNotificationInfo");
                 final Field notifNameField = infoKlass.getField("GARBAGE_COLLECTION_NOTIFICATION");
@@ -290,9 +288,7 @@
                                     }
                                 }
                             }
-                        } catch (IllegalAccessException e) {
-                            // Do nothing, counters would not get populated
-                        } catch (InvocationTargetException e) {
+                        } catch (IllegalAccessException | InvocationTargetException e) {
                             // Do nothing, counters would not get populated
                         }
                     }
--- a/jmh-core/src/main/java/org/openjdk/jmh/profile/LinuxPerfAsmProfiler.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/profile/LinuxPerfAsmProfiler.java	Wed Nov 16 11:40:00 2016 +0100
@@ -96,9 +96,7 @@
             outDrainer.join();
 
             FileUtils.safelyClose(fos);
-        } catch (IOException ex) {
-            throw new IllegalStateException(ex);
-        } catch (InterruptedException ex) {
+        } catch (IOException | InterruptedException ex) {
             throw new IllegalStateException(ex);
         }
     }
@@ -107,13 +105,13 @@
     protected PerfEvents readEvents(double skipSec) {
         FileReader fr = null;
         try {
-            Deduplicator<MethodDesc> dedup = new Deduplicator<MethodDesc>();
+            Deduplicator<MethodDesc> dedup = new Deduplicator<>();
 
             fr = new FileReader(perfParsedData);
             BufferedReader reader = new BufferedReader(fr);
 
-            Multimap<MethodDesc, Long> methods = new HashMultimap<MethodDesc, Long>();
-            Map<String, Multiset<Long>> events = new LinkedHashMap<String, Multiset<Long>>();
+            Multimap<MethodDesc, Long> methods = new HashMultimap<>();
+            Map<String, Multiset<Long>> events = new LinkedHashMap<>();
             for (String evName : this.events) {
                 events.put(evName, new TreeMultiset<Long>());
             }
@@ -181,7 +179,7 @@
                 methods.put(dedup.dedup(MethodDesc.nativeMethod(symbol, lib)), addr);
             }
 
-            IntervalMap<MethodDesc> methodMap = new IntervalMap<MethodDesc>();
+            IntervalMap<MethodDesc> methodMap = new IntervalMap<>();
             for (MethodDesc md : methods.keys()) {
                 Collection<Long> addrs = methods.get(md);
                 methodMap.add(md, Utils.min(addrs), Utils.max(addrs));
--- a/jmh-core/src/main/java/org/openjdk/jmh/profile/LinuxPerfNormProfiler.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/profile/LinuxPerfNormProfiler.java	Wed Nov 16 11:40:00 2016 +0100
@@ -67,7 +67,7 @@
     private final int incrementInterval;
     private final boolean isIncrementable;
 
-    private final Collection<String> supportedEvents = new ArrayList<String>();
+    private final Collection<String> supportedEvents = new ArrayList<>();
 
     public LinuxPerfNormProfiler(String initLine) throws ProfilerException {
         OptionParser parser = new OptionParser();
@@ -135,7 +135,7 @@
 
     @Override
     public Collection<String> addJVMInvokeOptions(BenchmarkParams params) {
-        List<String> cmd = new ArrayList<String>();
+        List<String> cmd = new ArrayList<>();
         if (useDefaultStats) {
             cmd.addAll(Arrays.asList("perf", "stat", "--log-fd", "2", "--field-separator", ",", "--detailed", "--detailed", "--detailed"));
         } else {
@@ -195,7 +195,7 @@
     }
 
     private Collection<? extends Result> process(BenchmarkResult br, File stdOut, File stdErr) {
-        Multiset<String> events = new HashMultiset<String>();
+        Multiset<String> events = new HashMultiset<>();
 
         FileReader fr = null;
         try {
@@ -293,7 +293,7 @@
                 } else {
                     totalOpts = md.getWarmupOps() + md.getMeasurementOps();
                 }
-                Collection<Result> results = new ArrayList<Result>();
+                Collection<Result> results = new ArrayList<>();
                 for (String key : events.keys()) {
                     results.add(new PerfResult(key, events.count(key) * 1.0 / totalOpts));
                 }
--- a/jmh-core/src/main/java/org/openjdk/jmh/profile/ProfilerFactory.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/profile/ProfilerFactory.java	Wed Nov 16 11:40:00 2016 +0100
@@ -90,7 +90,7 @@
     }
 
     public static List<ExternalProfiler> getSupportedExternal(Collection<ProfilerConfig> cfg) {
-        List<ExternalProfiler> profilers = new ArrayList<ExternalProfiler>();
+        List<ExternalProfiler> profilers = new ArrayList<>();
         for (ProfilerConfig p : cfg) {
             Profiler prof = ProfilerFactory.getProfilerOrNull(p);
             if (prof instanceof ExternalProfiler) {
@@ -101,7 +101,7 @@
     }
 
     public static List<InternalProfiler> getSupportedInternal(Collection<ProfilerConfig> cfg) {
-        List<InternalProfiler> profilers = new ArrayList<InternalProfiler>();
+        List<InternalProfiler> profilers = new ArrayList<>();
         for (ProfilerConfig p : cfg) {
             Profiler prof = ProfilerFactory.getProfilerOrNull(p);
             if (prof instanceof InternalProfiler) {
@@ -173,7 +173,7 @@
     private static final Map<String, Class<? extends Profiler>> BUILT_IN;
 
     static {
-        BUILT_IN = new TreeMap<String, Class<? extends Profiler>>();
+        BUILT_IN = new TreeMap<>();
         BUILT_IN.put("cl",       ClassloaderProfiler.class);
         BUILT_IN.put("comp",     CompilerProfiler.class);
         BUILT_IN.put("gc",       GCProfiler.class);
@@ -191,7 +191,7 @@
     }
 
     private static List<Class<? extends Profiler>> getDiscoveredProfilers() {
-        List<Class<? extends Profiler>> profs = new ArrayList<Class<? extends Profiler>>();
+        List<Class<? extends Profiler>> profs = new ArrayList<>();
         for (Profiler s : ServiceLoader.load(Profiler.class)) {
             profs.add(s.getClass());
         }
--- a/jmh-core/src/main/java/org/openjdk/jmh/profile/StackProfiler.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/profile/StackProfiler.java	Wed Nov 16 11:40:00 2016 +0100
@@ -107,7 +107,7 @@
 
             boolean excludePackages = set.valueOf(optExclude);
             excludePackageNames = excludePackages ?
-                    new HashSet<String>(set.valuesOf(optExcludeClasses)) :
+                    new HashSet<>(set.valuesOf(optExcludeClasses)) :
                     Collections.<String>emptySet();
         } catch (OptionException e) {
             throw new ProfilerException(e.getMessage());
@@ -139,7 +139,7 @@
         private final Map<Thread.State, Multiset<StackRecord>> stacks;
 
         public SamplingTask() {
-            stacks = new EnumMap<Thread.State, Multiset<StackRecord>>(Thread.State.class);
+            stacks = new EnumMap<>(Thread.State.class);
             for (Thread.State s : Thread.State.values()) {
                 stacks.put(s, new HashMultiset<StackRecord>());
             }
@@ -167,7 +167,7 @@
                     //   - Get the remaining number of stack lines and build the stack record
 
                     StackTraceElement[] stack = info.getStackTrace();
-                    List<String> lines = new ArrayList<String>();
+                    List<String> lines = new ArrayList<>();
 
                     for (StackTraceElement l : stack) {
                         String className = l.getClassName();
@@ -278,7 +278,7 @@
         }
 
         public String getStack(final Map<Thread.State, Multiset<StackRecord>> stacks) {
-            List<Thread.State> sortedStates = new ArrayList<Thread.State>(stacks.keySet());
+            List<Thread.State> sortedStates = new ArrayList<>(stacks.keySet());
             Collections.sort(sortedStates, new Comparator<Thread.State>() {
 
                 private long stateSize(Thread.State state) {
@@ -379,7 +379,7 @@
         @Override
         public StackResult aggregate(Collection<StackResult> results) {
             int topStacks = 0;
-            Map<Thread.State, Multiset<StackRecord>> sum = new EnumMap<Thread.State, Multiset<StackRecord>>(Thread.State.class);
+            Map<Thread.State, Multiset<StackRecord>> sum = new EnumMap<>(Thread.State.class);
             for (StackResult r : results) {
                 for (Map.Entry<Thread.State, Multiset<StackRecord>> entry : r.stacks.entrySet()) {
                     if (!sum.containsKey(entry.getKey())) {
--- a/jmh-core/src/main/java/org/openjdk/jmh/profile/WinPerfAsmProfiler.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/profile/WinPerfAsmProfiler.java	Wed Nov 16 11:40:00 2016 +0100
@@ -172,9 +172,7 @@
 
             errDrainer.join();
             outDrainer.join();
-        } catch (IOException ex) {
-            throw new IllegalStateException(ex);
-        } catch (InterruptedException ex) {
+        } catch (IOException | InterruptedException ex) {
             throw new IllegalStateException(ex);
         }
     }
@@ -183,13 +181,13 @@
     protected PerfEvents readEvents(double skipSec) {
         FileReader fr = null;
         try {
-            Deduplicator<MethodDesc> dedup = new Deduplicator<MethodDesc>();
+            Deduplicator<MethodDesc> dedup = new Deduplicator<>();
 
             fr = new FileReader(perfParsedData);
             BufferedReader reader = new BufferedReader(fr);
 
-            Multimap<MethodDesc, Long> methods = new HashMultimap<MethodDesc, Long>();
-            Map<String, Multiset<Long>> events = new LinkedHashMap<String, Multiset<Long>>();
+            Multimap<MethodDesc, Long> methods = new HashMultimap<>();
+            Map<String, Multiset<Long>> events = new LinkedHashMap<>();
             for (String evName : this.events) {
                 events.put(evName, new TreeMultiset<Long>());
             }
@@ -252,7 +250,7 @@
                 }
             }
 
-            IntervalMap<MethodDesc> methodMap = new IntervalMap<MethodDesc>();
+            IntervalMap<MethodDesc> methodMap = new IntervalMap<>();
             for (MethodDesc md : methods.keys()) {
                 Collection<Long> longs = methods.get(md);
                 methodMap.add(md, Utils.min(longs), Utils.max(longs));
--- a/jmh-core/src/main/java/org/openjdk/jmh/results/BenchmarkResult.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/results/BenchmarkResult.java	Wed Nov 16 11:40:00 2016 +0100
@@ -50,7 +50,7 @@
 
     public BenchmarkResult(BenchmarkParams params, Collection<IterationResult> data, BenchmarkResultMetaData md) {
         this.metadata = md;
-        this.benchmarkResults = new HashMultimap<String, Result>();
+        this.benchmarkResults = new HashMultimap<>();
         this.iterationResults = data;
         this.params = params;
     }
@@ -76,7 +76,7 @@
 
     public Result getPrimaryResult() {
         Aggregator<Result> aggregator = null;
-        Collection<Result> aggrs = new ArrayList<Result>();
+        Collection<Result> aggrs = new ArrayList<>();
         for (IterationResult r : iterationResults) {
             Result e = r.getPrimaryResult();
             aggrs.add(e);
@@ -97,7 +97,7 @@
 
     public Map<String, Result> getSecondaryResults() {
         // label -> collection of results
-        Multimap<String, Result> allSecondary = new HashMultimap<String, Result>();
+        Multimap<String, Result> allSecondary = new HashMultimap<>();
 
         // Build multiset of all results to capture if some labels are missing in some of the iterations
         for (IterationResult ir : iterationResults) {
@@ -110,7 +110,7 @@
             }
         }
 
-        Map<String, Result> answers = new TreeMap<String, Result>();
+        Map<String, Result> answers = new TreeMap<>();
 
         int totalIterations = iterationResults.size();
         // Create "0" entries in case certain labels did not appear in some of the iterations
@@ -140,7 +140,7 @@
 
         for (String label : benchmarkResults.keys()) {
             Aggregator<Result> aggregator = null;
-            Collection<Result> results = new ArrayList<Result>();
+            Collection<Result> results = new ArrayList<>();
             for (Result r : benchmarkResults.get(label)) {
                 if (r.getRole().isSecondary() && !r.getRole().isDerivative()) {
                     results.add(r);
@@ -156,7 +156,7 @@
         answers.putAll(produceDerivative(getPrimaryResult()));
 
         // add all derivative results on top: from secondaries
-        Map<String, Result> adds = new HashMap<String, Result>();
+        Map<String, Result> adds = new HashMap<>();
         for (Result r : answers.values()) {
             adds.putAll(produceDerivative(r));
         }
@@ -166,7 +166,7 @@
     }
 
     private Map<String, Result> produceDerivative(Result r) {
-        Map<String, Result> map = new HashMap<String, Result>();
+        Map<String, Result> map = new HashMap<>();
         for (Object rr : r.getDerivativeResults()) {
             map.put(((Result) rr).getLabel(), (Result) rr);
         }
--- a/jmh-core/src/main/java/org/openjdk/jmh/results/BenchmarkTaskResult.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/results/BenchmarkTaskResult.java	Wed Nov 16 11:40:00 2016 +0100
@@ -44,7 +44,7 @@
     public BenchmarkTaskResult(long allOperations, long measuredOperations) {
         this.allOperations = allOperations;
         this.measuredOperations = measuredOperations;
-        this.results = new ArrayList<Result>();
+        this.results = new ArrayList<>();
     }
 
     public void add(Result result) {
--- a/jmh-core/src/main/java/org/openjdk/jmh/results/IterationResult.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/results/IterationResult.java	Wed Nov 16 11:40:00 2016 +0100
@@ -38,7 +38,7 @@
 public class IterationResult implements Serializable {
     private static final long serialVersionUID = 960397066774710819L;
 
-    private static final Multimap<String, Result> EMPTY_MAP = new TreeMultimap<String, Result>();
+    private static final Multimap<String, Result> EMPTY_MAP = new TreeMultimap<>();
     private static final List<Result> EMPTY_LIST = Collections.emptyList();
 
     private final BenchmarkParams benchmarkParams;
@@ -70,7 +70,7 @@
             if (primaryResults == EMPTY_LIST) {
                 primaryResults = Collections.singleton(result);
             } else if (primaryResults.size() == 1) {
-                List<Result> newResults = new ArrayList<Result>(2);
+                List<Result> newResults = new ArrayList<>(2);
                 newResults.addAll(primaryResults);
                 newResults.add(result);
                 primaryResults = newResults;
@@ -81,7 +81,7 @@
 
         if (result.getRole().isSecondary()) {
             if (secondaryResults == EMPTY_MAP) {
-                secondaryResults = new TreeMultimap<String, Result>();
+                secondaryResults = new TreeMultimap<>();
             }
             secondaryResults.put(result.getLabel(), result);
         }
@@ -96,7 +96,7 @@
     }
 
     public Map<String, Result> getSecondaryResults() {
-        Map<String, Result> answer = new TreeMap<String, Result>();
+        Map<String, Result> answer = new TreeMap<>();
         for (String label : secondaryResults.keys()) {
             Collection<Result> results = secondaryResults.get(label);
 
@@ -112,7 +112,7 @@
         answer.putAll(produceDerivative(getPrimaryResult()));
 
         // add all secondary derivative results on top: from secondaries
-        Map<String, Result> adds = new HashMap<String, Result>();
+        Map<String, Result> adds = new HashMap<>();
         for (Result r : answer.values()) {
             adds.putAll(produceDerivative(r));
         }
@@ -122,7 +122,7 @@
     }
 
     private Map<String, Result> produceDerivative(Result r) {
-        Map<String, Result> map = new HashMap<String, Result>();
+        Map<String, Result> map = new HashMap<>();
         for (Object rr : r.getDerivativeResults()) {
             map.put(((Result) rr).getLabel(), (Result) rr);
         }
--- a/jmh-core/src/main/java/org/openjdk/jmh/results/Result.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/results/Result.java	Wed Nov 16 11:40:00 2016 +0100
@@ -40,7 +40,7 @@
  */
 public abstract class Result<T extends Result<T>> implements Serializable {
     private static final long serialVersionUID = -7332879501317733312L;
-    private static final Deduplicator<String> DEDUP = new Deduplicator<String>();
+    private static final Deduplicator<String> DEDUP = new Deduplicator<>();
 
     protected final ResultRole role;
     protected final String label;
--- a/jmh-core/src/main/java/org/openjdk/jmh/results/RunResult.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/results/RunResult.java	Wed Nov 16 11:40:00 2016 +0100
@@ -71,7 +71,7 @@
             return null;
         }
 
-        Collection<IterationResult> results = new ArrayList<IterationResult>();
+        Collection<IterationResult> results = new ArrayList<>();
         for (BenchmarkResult r : benchmarkResults) {
             for (IterationResult ir : r.getIterationResults()) {
                 results.add(ir);
--- a/jmh-core/src/main/java/org/openjdk/jmh/results/format/JSONResultFormat.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/results/format/JSONResultFormat.java	Wed Nov 16 11:40:00 2016 +0100
@@ -106,7 +106,7 @@
 
             pw.println("},"); // primaryMetric end
 
-            Collection<String> secondaries = new ArrayList<String>();
+            Collection<String> secondaries = new ArrayList<>();
             for (Map.Entry<String, Result> e : runResult.getSecondaryResults().entrySet()) {
                 String secondaryName = e.getKey();
                 Result result = e.getValue();
@@ -120,9 +120,9 @@
                 sb.append("\"scoreUnit\" : \"").append(result.getScoreUnit()).append("\",");
                 sb.append("\"rawData\" : ");
 
-                Collection<String> l2 = new ArrayList<String>();
+                Collection<String> l2 = new ArrayList<>();
                 for (BenchmarkResult benchmarkResult : runResult.getBenchmarkResults()) {
-                    Collection<String> scores = new ArrayList<String>();
+                    Collection<String> scores = new ArrayList<>();
                     for (IterationResult r : benchmarkResult.getIterationResults()) {
                         Result rr = r.getSecondaryResults().get(secondaryName);
                         if (rr != null) {
@@ -149,14 +149,14 @@
 
     private String getRawData(RunResult runResult, boolean histogram) {
         StringBuilder sb = new StringBuilder();
-        Collection<String> runs = new ArrayList<String>();
+        Collection<String> runs = new ArrayList<>();
 
         if (PRINT_RAW_DATA) {
             for (BenchmarkResult benchmarkResult : runResult.getBenchmarkResults()) {
-                Collection<String> iterations = new ArrayList<String>();
+                Collection<String> iterations = new ArrayList<>();
                 for (IterationResult r : benchmarkResult.getIterationResults()) {
                     if (histogram) {
-                        Collection<String> singleIter = new ArrayList<String>();
+                        Collection<String> singleIter = new ArrayList<>();
                         for (Map.Entry<Double, Long> item : Utils.adaptForLoop(r.getPrimaryResult().getStatistics().getRawData())) {
                             singleIter.add("< " + emit(item.getKey()) + "; " + item.getValue() + " >");
                         }
--- a/jmh-core/src/main/java/org/openjdk/jmh/results/format/LaTeXResultFormat.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/results/format/LaTeXResultFormat.java	Wed Nov 16 11:40:00 2016 +0100
@@ -48,10 +48,10 @@
 
     @Override
     public void writeOut(Collection<RunResult> results) {
-        SortedSet<String> params = new TreeSet<String>();
-        Set<String> benchNames = new HashSet<String>();
+        SortedSet<String> params = new TreeSet<>();
+        Set<String> benchNames = new HashSet<>();
 
-        Set<String> units = new HashSet<String>();
+        Set<String> units = new HashSet<>();
         for (RunResult rr : results) {
             String benchmark = rr.getParams().getBenchmark();
             benchNames.add(benchmark);
--- a/jmh-core/src/main/java/org/openjdk/jmh/results/format/TextResultFormat.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/results/format/TextResultFormat.java	Wed Nov 16 11:40:00 2016 +0100
@@ -49,7 +49,7 @@
     public void writeOut(Collection<RunResult> runResults) {
         final int COLUMN_PAD = 2;
 
-        Collection<String> benchNames = new ArrayList<String>();
+        Collection<String> benchNames = new ArrayList<>();
         for (RunResult runResult : runResults) {
             benchNames.add(runResult.getParams().getBenchmark());
             for (String label : runResult.getSecondaryResults().keySet()) {
@@ -66,8 +66,8 @@
         }
 
         // determine param lengths
-        Map<String, Integer> paramLengths = new HashMap<String, Integer>();
-        SortedSet<String> params = new TreeSet<String>();
+        Map<String, Integer> paramLengths = new HashMap<>();
+        SortedSet<String> params = new TreeSet<>();
         for (RunResult runResult : runResults) {
             BenchmarkParams bp = runResult.getParams();
             for (String k : bp.getParamsKeys()) {
--- a/jmh-core/src/main/java/org/openjdk/jmh/results/format/XSVResultFormat.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/results/format/XSVResultFormat.java	Wed Nov 16 11:40:00 2016 +0100
@@ -48,7 +48,7 @@
 
     @Override
     public void writeOut(Collection<RunResult> results) {
-        SortedSet<String> params = new TreeSet<String>();
+        SortedSet<String> params = new TreeSet<>();
         for (RunResult res : results) {
             params.addAll(res.getParams().getParamsKeys());
         }
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/AbstractResourceReader.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/AbstractResourceReader.java	Wed Nov 16 11:40:00 2016 +0100
@@ -74,7 +74,7 @@
             }
 
             if (urls.hasMoreElements()) {
-                List<Reader> readers = new ArrayList<Reader>();
+                List<Reader> readers = new ArrayList<>();
                 URL url = null;
                 try {
                     while (urls.hasMoreElements()) {
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/ActionPlan.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/ActionPlan.java	Wed Nov 16 11:40:00 2016 +0100
@@ -36,7 +36,7 @@
 
     public ActionPlan(ActionType type) {
         this.type = type;
-        actions = new ArrayList<Action>();
+        this.actions = new ArrayList<>();
     }
 
     public ActionType getType() {
@@ -56,7 +56,7 @@
     }
 
     public List<Action> getMeasurementActions() {
-        List<Action> result = new ArrayList<Action>();
+        List<Action> result = new ArrayList<>();
         for (Action action : actions) {
             switch (action.getMode()) {
                 case MEASUREMENT:
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/BaseRunner.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/BaseRunner.java	Wed Nov 16 11:40:00 2016 +0100
@@ -78,7 +78,7 @@
     }
 
     protected Multimap<BenchmarkParams, BenchmarkResult> runBenchmarksEmbedded(ActionPlan actionPlan) {
-        Multimap<BenchmarkParams, BenchmarkResult> results = new TreeMultimap<BenchmarkParams, BenchmarkResult>();
+        Multimap<BenchmarkParams, BenchmarkResult> results = new TreeMultimap<>();
 
         for (Action action : actionPlan.getActions()) {
             BenchmarkParams params = action.getParams();
@@ -101,8 +101,8 @@
             out.println("# *** WARNING: Non-forked runs may silently omit JVM options, mess up profilers, disable compiler hints, etc. ***");
             out.println("# *** WARNING: Use non-forked runs only for debugging purposes, not for actual performance runs. ***");
 
-            final List<IterationResult> res = new ArrayList<IterationResult>();
-            final List<BenchmarkResultMetaData> mds = new ArrayList<BenchmarkResultMetaData>();
+            final List<IterationResult> res = new ArrayList<>();
+            final List<BenchmarkResultMetaData> mds = new ArrayList<>();
 
             IterationResultAcceptor acceptor = new IterationResultAcceptor() {
                 @Override
@@ -308,7 +308,7 @@
      */
     public boolean runSystemGC() {
         if (options.shouldDoGC().orElse(Defaults.DO_GC)) {
-            List<GarbageCollectorMXBean> enabledBeans = new ArrayList<GarbageCollectorMXBean>();
+            List<GarbageCollectorMXBean> enabledBeans = new ArrayList<>();
 
             long beforeGcCount = 0;
             for (GarbageCollectorMXBean bean : ManagementFactory.getGarbageCollectorMXBeans()) {
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/BenchmarkHandler.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/BenchmarkHandler.java	Wed Nov 16 11:40:00 2016 +0100
@@ -69,10 +69,10 @@
 
         this.method = BenchmarkHandler.findBenchmarkMethod(clazz, target.substring(lastDot + 1));
         this.profilers = ProfilerFactory.getSupportedInternal(options.getProfilers());
-        this.profilersRev = new ArrayList<InternalProfiler>(profilers);
+        this.profilersRev = new ArrayList<>(profilers);
         Collections.reverse(profilersRev);
 
-        final BlockingQueue<ThreadParams> tps = new ArrayBlockingQueue<ThreadParams>(executionParams.getThreads());
+        final BlockingQueue<ThreadParams> tps = new ArrayBlockingQueue<>(executionParams.getThreads());
         tps.addAll(distributeThreads(executionParams.getThreads(), executionParams.getThreadGroups()));
 
         this.threadData = new ThreadLocal<ThreadData>() {
@@ -85,9 +85,7 @@
                         throw new IllegalStateException("Cannot get another thread params");
                     }
                     return new ThreadData(o, t);
-                } catch (InstantiationException e) {
-                    throw new RuntimeException("Class " + clazz.getName() + " instantiation error ", e);
-                } catch (IllegalAccessException e) {
+                } catch (InstantiationException | IllegalAccessException e) {
                     throw new RuntimeException("Class " + clazz.getName() + " instantiation error ", e);
                 }
             }
@@ -102,7 +100,7 @@
     }
 
     static List<ThreadParams> distributeThreads(int threads, int[] groups) {
-        List<ThreadParams> result = new ArrayList<ThreadParams>();
+        List<ThreadParams> result = new ArrayList<>();
         int totalGroupThreads = Utils.sum(groups);
         int totalGroups = (int) Math.ceil(1D * threads / totalGroupThreads);
         int totalSubgroups = groups.length;
@@ -320,7 +318,7 @@
         CountDownLatch preTearDownBarrier = new CountDownLatch(numThreads);
 
         // result object to accumulate the results in
-        List<Result> iterationResults = new ArrayList<Result>();
+        List<Result> iterationResults = new ArrayList<>();
 
         InfraControl control = new InfraControl(benchmarkParams, params,
                 preSetupBarrier, preTearDownBarrier, last,
@@ -339,8 +337,8 @@
         startProfilers(benchmarkParams, params);
 
         // submit tasks to threadpool
-        List<Future<BenchmarkTaskResult>> completed = new ArrayList<Future<BenchmarkTaskResult>>();
-        CompletionService<BenchmarkTaskResult> srv = new ExecutorCompletionService<BenchmarkTaskResult>(executor);
+        List<Future<BenchmarkTaskResult>> completed = new ArrayList<>();
+        CompletionService<BenchmarkTaskResult> srv = new ExecutorCompletionService<>(executor);
         for (BenchmarkTask runner : runners) {
             srv.submit(runner);
         }
@@ -401,7 +399,7 @@
         long allOps = 0;
         long measuredOps = 0;
 
-        List<Throwable> errors = new ArrayList<Throwable>();
+        List<Throwable> errors = new ArrayList<>();
         for (Future<BenchmarkTaskResult> fr : completed) {
             try {
                 BenchmarkTaskResult btr = fr.get();
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/BenchmarkList.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/BenchmarkList.java	Wed Nov 16 11:40:00 2016 +0100
@@ -82,23 +82,23 @@
     public SortedSet<BenchmarkListEntry> find(OutputFormat out, List<String> includes, List<String> excludes) {
 
         // assume we match all benchmarks when include is empty
-        List<String> regexps = new ArrayList<String>(includes);
+        List<String> regexps = new ArrayList<>(includes);
         if (regexps.isEmpty()) {
             regexps.add(Defaults.INCLUDE_BENCHMARKS);
         }
 
         // compile all patterns
-        List<Pattern> includePatterns = new ArrayList<Pattern>(regexps.size());
+        List<Pattern> includePatterns = new ArrayList<>(regexps.size());
         for (String regexp : regexps) {
             includePatterns.add(Pattern.compile(regexp));
         }
-        List<Pattern> excludePatterns = new ArrayList<Pattern>(excludes.size());
+        List<Pattern> excludePatterns = new ArrayList<>(excludes.size());
         for (String regexp : excludes) {
             excludePatterns.add(Pattern.compile(regexp));
         }
 
         // find all benchmarks containing pattern
-        SortedSet<BenchmarkListEntry> result = new TreeSet<BenchmarkListEntry>();
+        SortedSet<BenchmarkListEntry> result = new TreeSet<>();
         try {
             for (Reader r : getReaders()) {
                 BufferedReader reader = null;
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/CompilerHints.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/CompilerHints.java	Wed Nov 16 11:40:00 2016 +0100
@@ -60,7 +60,7 @@
         if (hintsFile == null) {
             try {
                 final Set<String> defaultHints = defaultList().get();
-                List<String> hints = new ArrayList<String>(defaultHints.size() + 2);
+                List<String> hints = new ArrayList<>(defaultHints.size() + 2);
                 hints.add("quiet");
                 if (Boolean.getBoolean("jmh.blackhole.forceInline")) {
                     hints.add("inline,org/openjdk/jmh/infra/Blackhole.*");
@@ -111,10 +111,7 @@
                 } else if (Integer.valueOf(versionDigits[0]) == 5 && Integer.valueOf(versionDigits[1]) >= 10) {
                     return true;
                 }
-            } catch (NumberFormatException e) {
-                // unknown Zing version format
-                System.err.println("ERROR: Zing version format does not match 1.*.0-zing_*.*.*.*");
-            } catch (ArrayIndexOutOfBoundsException e) {
+            } catch (NumberFormatException | ArrayIndexOutOfBoundsException e) {
                 // unknown Zing version format
                 System.err.println("ERROR: Zing version format does not match 1.*.0-zing_*.*.*.*");
             }
@@ -127,7 +124,7 @@
     }
 
     private Set<String> read() {
-        Set<String> result = new TreeSet<String>();
+        Set<String> result = new TreeSet<>();
 
         try {
             for (Reader r : getReaders()) {
@@ -167,7 +164,7 @@
      * @return the compiler hint files specified by the command
      */
     public static List<String> getCompileCommandFiles(List<String> command){
-        List<String> compileCommandFiles = new ArrayList<String>();
+        List<String> compileCommandFiles = new ArrayList<>();
         for (String cmdLineWord : command) {
             if (cmdLineWord.startsWith(XX_COMPILE_COMMAND_FILE)) {
                 compileCommandFiles.add(cmdLineWord.substring(XX_COMPILE_COMMAND_FILE.length()));
@@ -196,7 +193,7 @@
             return;
         }
 
-        List<String> hintFiles = new ArrayList<String>();
+        List<String> hintFiles = new ArrayList<>();
         hintFiles.add(hintsFile());
         removeCompileCommandFiles(command, hintFiles);
         if (hintFiles.size() == 1) {
@@ -228,7 +225,7 @@
             return compileCommandFiles.get(0);
         }
         try {
-            Set<String> hints = new TreeSet<String>();
+            Set<String> hints = new TreeSet<>();
             for(String file : compileCommandFiles) {
                 hints.addAll(fromFile(file).get());
             }
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/ForkedMain.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/ForkedMain.java	Wed Nov 16 11:40:00 2016 +0100
@@ -40,7 +40,7 @@
 class ForkedMain {
 
     private static final AtomicBoolean hangupFuse = new AtomicBoolean();
-    private static final AtomicReference<BinaryLinkClient> linkRef = new AtomicReference<BinaryLinkClient>();
+    private static final AtomicReference<BinaryLinkClient> linkRef = new AtomicReference<>();
 
     private static volatile boolean gracefullyFinished;
     private static volatile Throwable exception;
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/Runner.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/Runner.java	Wed Nov 16 11:40:00 2016 +0100
@@ -264,7 +264,7 @@
         // override the benchmark types;
         // this may yield new benchmark records
         if (!options.getBenchModes().isEmpty()) {
-            List<BenchmarkListEntry> newBenchmarks = new ArrayList<BenchmarkListEntry>();
+            List<BenchmarkListEntry> newBenchmarks = new ArrayList<>();
             for (BenchmarkListEntry br : benchmarks) {
                 for (Mode m : options.getBenchModes()) {
                     newBenchmarks.add(br.cloneWith(m));
@@ -278,7 +278,7 @@
 
         // clone with all the modes
         {
-            List<BenchmarkListEntry> newBenchmarks = new ArrayList<BenchmarkListEntry>();
+            List<BenchmarkListEntry> newBenchmarks = new ArrayList<>();
             for (BenchmarkListEntry br : benchmarks) {
                 if (br.getMode() == Mode.All) {
                     for (Mode mode : Mode.values()) {
@@ -296,7 +296,7 @@
 
         // clone with all parameters
         {
-            List<BenchmarkListEntry> newBenchmarks = new ArrayList<BenchmarkListEntry>();
+            List<BenchmarkListEntry> newBenchmarks = new ArrayList<>();
             for (BenchmarkListEntry br : benchmarks) {
                 if (br.getParams().hasValue()) {
                     for (WorkloadParams p : explodeAllParams(br)) {
@@ -332,7 +332,7 @@
     private List<ActionPlan> getActionPlans(Set<BenchmarkListEntry> benchmarks) {
         ActionPlan base = new ActionPlan(ActionType.FORKED);
 
-        LinkedHashSet<BenchmarkListEntry> warmupBenches = new LinkedHashSet<BenchmarkListEntry>();
+        LinkedHashSet<BenchmarkListEntry> warmupBenches = new LinkedHashSet<>();
 
         List<String> warmupMicrosRegexp = options.getWarmupIncludes();
         if (warmupMicrosRegexp != null && !warmupMicrosRegexp.isEmpty()) {
@@ -351,7 +351,7 @@
 
         boolean addEmbedded = false;
 
-        List<ActionPlan> result = new ArrayList<ActionPlan>();
+        List<ActionPlan> result = new ArrayList<>();
         for (BenchmarkListEntry br : benchmarks) {
             BenchmarkParams params = newBenchmarkParams(br, ActionMode.UNDEF);
 
@@ -465,7 +465,7 @@
         String jvm = options.getJvm().orElse(
                 benchmark.getJvm().orElse(Utils.getCurrentJvm()));
 
-        Collection<String> jvmArgs = new ArrayList<String>();
+        Collection<String> jvmArgs = new ArrayList<>();
 
         jvmArgs.addAll(options.getJvmArgsPrepend().orElse(
                 benchmark.getJvmArgsPrepend().orElse(Collections.<String>emptyList())));
@@ -488,7 +488,7 @@
 
     private List<WorkloadParams> explodeAllParams(BenchmarkListEntry br) throws RunnerException {
         Map<String, String[]> benchParams = br.getParams().orElse(Collections.<String, String[]>emptyMap());
-        List<WorkloadParams> ps = new ArrayList<WorkloadParams>();
+        List<WorkloadParams> ps = new ArrayList<>();
         for (Map.Entry<String, String[]> e : benchParams.entrySet()) {
             String k = e.getKey();
             String[] vals = e.getValue();
@@ -507,7 +507,7 @@
                     idx++;
                 }
             } else {
-                List<WorkloadParams> newPs = new ArrayList<WorkloadParams>();
+                List<WorkloadParams> newPs = new ArrayList<>();
                 for (WorkloadParams p : ps) {
                     int idx = 0;
                     for (String v : values) {
@@ -526,7 +526,7 @@
     private Collection<RunResult> runBenchmarks(SortedSet<BenchmarkListEntry> benchmarks) throws RunnerException {
         out.startRun();
 
-        Multimap<BenchmarkParams, BenchmarkResult> results = new TreeMultimap<BenchmarkParams, BenchmarkResult>();
+        Multimap<BenchmarkParams, BenchmarkResult> results = new TreeMultimap<>();
         List<ActionPlan> plan = getActionPlans(benchmarks);
 
         etaBeforeBenchmarks(plan);
@@ -561,7 +561,7 @@
     }
 
     private SortedSet<RunResult> mergeRunResults(Multimap<BenchmarkParams, BenchmarkResult> results) {
-        SortedSet<RunResult> result = new TreeSet<RunResult>(RunResult.DEFAULT_SORT_COMPARATOR);
+        SortedSet<RunResult> result = new TreeSet<>(RunResult.DEFAULT_SORT_COMPARATOR);
         for (BenchmarkParams key : results.keys()) {
             result.add(new RunResult(key, results.get(key)));
         }
@@ -569,7 +569,7 @@
     }
 
     private Multimap<BenchmarkParams, BenchmarkResult> runSeparate(ActionPlan actionPlan) {
-        Multimap<BenchmarkParams, BenchmarkResult> results = new HashMultimap<BenchmarkParams, BenchmarkResult>();
+        Multimap<BenchmarkParams, BenchmarkResult> results = new HashMultimap<>();
 
         if (actionPlan.getMeasurementActions().size() != 1) {
             throw new IllegalStateException("Expect only single benchmark in the action plan, but was " + actionPlan.getMeasurementActions().size());
@@ -592,7 +592,7 @@
                 printErr &= prof.allowPrintErr();
             }
 
-            List<ExternalProfiler> profilersRev = new ArrayList<ExternalProfiler>(profilers);
+            List<ExternalProfiler> profilersRev = new ArrayList<>(profilers);
             Collections.reverse(profilersRev);
 
             boolean forcePrint = options.verbosity().orElse(Defaults.VERBOSITY).equalsOrHigherThan(VerboseMode.EXTRA);
@@ -651,7 +651,7 @@
                     }
                     out.println("");
 
-                    List<String> consumed = new ArrayList<String>();
+                    List<String> consumed = new ArrayList<>();
                     if (!printOut) consumed.add("stdout");
                     if (!printErr) consumed.add("stderr");
                     if (!consumed.isEmpty()) {
@@ -787,14 +787,14 @@
      */
     List<String> getForkedMainCommand(BenchmarkParams benchmark, List<ExternalProfiler> profilers, String host, int port) {
         // Poll profilers for options
-        List<String> javaInvokeOptions = new ArrayList<String>();
-        List<String> javaOptions = new ArrayList<String>();
+        List<String> javaInvokeOptions = new ArrayList<>();
+        List<String> javaOptions = new ArrayList<>();
         for (ExternalProfiler prof : profilers) {
             javaInvokeOptions.addAll(prof.addJVMInvokeOptions(benchmark));
             javaOptions.addAll(prof.addJVMOptions(benchmark));
         }
 
-        List<String> command = new ArrayList<String>();
+        List<String> command = new ArrayList<>();
 
         // prefix java invoke options, if any profiler wants it
         command.addAll(javaInvokeOptions);
@@ -834,7 +834,7 @@
      * @return
      */
     List<String> getVersionMainCommand(BenchmarkParams benchmark) {
-        List<String> command = new ArrayList<String>();
+        List<String> command = new ArrayList<>();
 
         // use supplied jvm, if given
         command.add(benchmark.getJvm());
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/WorkloadParams.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/WorkloadParams.java	Wed Nov 16 11:40:00 2016 +0100
@@ -36,7 +36,7 @@
     private final SortedMap<String, Value> params;
 
     public WorkloadParams() {
-        params = new TreeMap<String, Value>();
+        params = new TreeMap<>();
     }
 
     private WorkloadParams(SortedMap<String, Value> params) {
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/format/TextReportFormat.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/format/TextReportFormat.java	Wed Nov 16 11:40:00 2016 +0100
@@ -85,7 +85,7 @@
             int[] tg = params.getThreadGroups();
 
             // TODO: Make params.getThreadGroupLabels return List
-            List<String> labels = new ArrayList<String>(params.getThreadGroupLabels());
+            List<String> labels = new ArrayList<>(params.getThreadGroupLabels());
             String[] ss = new String[tg.length];
             for (int cnt = 0; cnt < tg.length; cnt++) {
                 ss[cnt] = tg[cnt] + "x \"" + labels.get(cnt) + "\"";
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/link/BinaryLinkClient.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/link/BinaryLinkClient.java	Wed Nov 16 11:40:00 2016 +0100
@@ -120,10 +120,7 @@
     private Object readFrame() throws IOException, ClassNotFoundException {
         try {
             return ois.readObject();
-        } catch (ClassNotFoundException ex) {
-            failed = true;
-            throw ex;
-        } catch (IOException ex) {
+        } catch (ClassNotFoundException | IOException ex) {
             failed = true;
             throw ex;
         }
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/link/BinaryLinkServer.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/link/BinaryLinkServer.java	Wed Nov 16 11:40:00 2016 +0100
@@ -81,8 +81,8 @@
     public BinaryLinkServer(Options opts, OutputFormat out) throws IOException {
         this.opts = opts;
         this.out = out;
-        this.methods = new HashMap<String, Method>();
-        this.forbidden = new HashSet<String>();
+        this.methods = new HashMap<>();
+        this.forbidden = new HashSet<>();
 
         // enumerate methods
         for (Method m : OutputFormat.class.getMethods()) {
@@ -101,11 +101,11 @@
         acceptor = new Acceptor();
         acceptor.start();
 
-        handler = new AtomicReference<Handler>();
-        metadata = new AtomicReference<BenchmarkResultMetaData>();
+        handler = new AtomicReference<>();
+        metadata = new AtomicReference<>();
         results = new AtomicReference<List<IterationResult>>(new ArrayList<IterationResult>());
-        exception = new AtomicReference<BenchmarkException>();
-        plan = new AtomicReference<ActionPlan>();
+        exception = new AtomicReference<>();
+        plan = new AtomicReference<>();
     }
 
     public void terminate() {
@@ -174,11 +174,7 @@
         try {
             Method m = InetAddress.class.getMethod("getLoopbackAddress");
             return (InetAddress) m.invoke(null);
-        } catch (InvocationTargetException e) {
-            // shun
-        } catch (NoSuchMethodException e) {
-            // shun
-        } catch (IllegalAccessException e) {
+        } catch (InvocationTargetException | IllegalAccessException | NoSuchMethodException e) {
             // shun
         }
 
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/link/ClassConventions.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/link/ClassConventions.java	Wed Nov 16 11:40:00 2016 +0100
@@ -30,7 +30,7 @@
 
 class ClassConventions {
 
-    private static final Map<Method, String> METHOD_NAMES = new HashMap<Method, String>();
+    private static final Map<Method, String> METHOD_NAMES = new HashMap<>();
 
     public static String getMethodName(Method m) {
         String result = METHOD_NAMES.get(m);
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/options/CommandLineOptions.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/options/CommandLineOptions.java	Wed Nov 16 11:40:00 2016 +0100
@@ -51,17 +51,17 @@
     private final Optional<Integer> warmupIterations;
     private final Optional<TimeValue> warmupTime;
     private final Optional<Integer> warmupBatchSize;
-    private final List<Mode> benchMode = new ArrayList<Mode>();
+    private final List<Mode> benchMode = new ArrayList<>();
     private final Optional<Integer> threads;
-    private final List<Integer> threadGroups = new ArrayList<Integer>();
+    private final List<Integer> threadGroups = new ArrayList<>();
     private final Optional<Boolean> synchIterations;
     private final Optional<Boolean> gcEachIteration;
     private final Optional<VerboseMode> verbose;
     private final Optional<Boolean> failOnError;
-    private final List<ProfilerConfig> profilers = new ArrayList<ProfilerConfig>();
+    private final List<ProfilerConfig> profilers = new ArrayList<>();
     private final Optional<TimeUnit> timeUnit;
     private final Optional<Integer> opsPerInvocation;
-    private final List<String> regexps = new ArrayList<String>();
+    private final List<String> regexps = new ArrayList<>();
     private final Optional<Integer> fork;
     private final Optional<Integer> warmupFork;
     private final Optional<String> output;
@@ -71,10 +71,10 @@
     private final Optional<Collection<String>> jvmArgs;
     private final Optional<Collection<String>> jvmArgsAppend;
     private final Optional<Collection<String>> jvmArgsPrepend;
-    private final List<String> excludes = new ArrayList<String>();
+    private final List<String> excludes = new ArrayList<>();
     private final Optional<WarmupMode> warmupMode;
-    private final List<String> warmupMicros = new ArrayList<String>();
-    private final Multimap<String, String> params = new HashMultimap<String, String>();
+    private final List<String> warmupMicros = new ArrayList<>();
+    private final Multimap<String, String> params = new HashMultimap<>();
     private final boolean list;
     private final boolean listWithParams;
     private final boolean listResultFormats;
@@ -333,7 +333,7 @@
 
             if (set.has(optBenchmarkMode)) {
                 try {
-                    List<Mode> modes = new ArrayList<Mode>();
+                    List<Mode> modes = new ArrayList<>();
                     for (String m : optBenchmarkMode.values(set)) {
                         modes.add(Mode.deepValueOf(m));
                     }
@@ -653,7 +653,7 @@
 
     @Override
     public Collection<Mode> getBenchModes() {
-        return new HashSet<Mode>(benchMode);
+        return new HashSet<>(benchMode);
     }
 
     @Override
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/options/OptionsBuilder.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/options/OptionsBuilder.java	Wed Nov 16 11:40:00 2016 +0100
@@ -72,7 +72,7 @@
 
     // ---------------------------------------------------------------------------
 
-    private final List<String> regexps = new ArrayList<String>();
+    private final List<String> regexps = new ArrayList<>();
 
     @Override
     public ChainedOptionsBuilder include(String regexp) {
@@ -82,7 +82,7 @@
 
     @Override
     public List<String> getIncludes() {
-        List<String> result = new ArrayList<String>();
+        List<String> result = new ArrayList<>();
 
         result.addAll(regexps);
         if (otherOptions != null) {
@@ -94,7 +94,7 @@
 
     // ---------------------------------------------------------------------------
 
-    private final List<String> excludes = new ArrayList<String>();
+    private final List<String> excludes = new ArrayList<>();
 
     @Override
     public ChainedOptionsBuilder exclude(String regexp) {
@@ -104,7 +104,7 @@
 
     @Override
     public List<String> getExcludes() {
-        List<String> result = new ArrayList<String>();
+        List<String> result = new ArrayList<>();
 
         result.addAll(excludes);
         if (otherOptions != null) {
@@ -192,7 +192,7 @@
 
     // ---------------------------------------------------------------------------
 
-    private List<ProfilerConfig> profilers = new ArrayList<ProfilerConfig>();
+    private List<ProfilerConfig> profilers = new ArrayList<>();
 
     @Override
     public ChainedOptionsBuilder addProfiler(Class<? extends Profiler> prof) {
@@ -410,7 +410,7 @@
 
     // ---------------------------------------------------------------------------
 
-    private final List<String> warmupMicros = new ArrayList<String>();
+    private final List<String> warmupMicros = new ArrayList<>();
 
     @Override
     public ChainedOptionsBuilder includeWarmup(String regexp) {
@@ -420,7 +420,7 @@
 
     @Override
     public List<String> getWarmupIncludes() {
-        List<String> result = new ArrayList<String>();
+        List<String> result = new ArrayList<>();
         result.addAll(warmupMicros);
         if (otherOptions != null) {
             result.addAll(otherOptions.getWarmupIncludes());
@@ -672,7 +672,7 @@
 
     // ---------------------------------------------------------------------------
 
-    private Multimap<String, String> params = new HashMultimap<String, String>();
+    private Multimap<String, String> params = new HashMultimap<>();
 
     @Override
     public Optional<Collection<String>> getParameter(String name) {
--- a/jmh-core/src/main/java/org/openjdk/jmh/util/BoundedPriorityQueue.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/util/BoundedPriorityQueue.java	Wed Nov 16 11:40:00 2016 +0100
@@ -62,7 +62,7 @@
     public BoundedPriorityQueue(int maxSize, Comparator<? super E> comparator) {
         this.maxSize = maxSize;
         this.comparator = reverse(comparator);
-        this.queue = new PriorityQueue<E>(10, this.comparator);
+        this.queue = new PriorityQueue<>(10, this.comparator);
     }
 
     /**
--- a/jmh-core/src/main/java/org/openjdk/jmh/util/ClassUtils.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/util/ClassUtils.java	Wed Nov 16 11:40:00 2016 +0100
@@ -57,7 +57,7 @@
      * @return list of methods.
      */
     public static List<Method> enumerateMethods(Class<?> clazz) {
-        List<Method> result = new ArrayList<Method>();
+        List<Method> result = new ArrayList<>();
         Class<?> current = clazz;
         while (current != null) {
             result.addAll(Arrays.asList(current.getDeclaredMethods()));
@@ -149,7 +149,7 @@
             prefix[c] = prefixCut ? String.valueOf(prefix[c].charAt(0)) : "";
         }
 
-        Map<String, String> result = new HashMap<String, String>();
+        Map<String, String> result = new HashMap<>();
         for (String s : src) {
             int prefixLen = prefix.length;
 
--- a/jmh-core/src/main/java/org/openjdk/jmh/util/Deduplicator.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/util/Deduplicator.java	Wed Nov 16 11:40:00 2016 +0100
@@ -32,7 +32,7 @@
     final ConcurrentMap<T, T> map;
 
     public Deduplicator() {
-        map = new ConcurrentHashMap<T, T>();
+        map = new ConcurrentHashMap<>();
     }
 
     public T dedup(T t) {
--- a/jmh-core/src/main/java/org/openjdk/jmh/util/DelegatingMultimap.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/util/DelegatingMultimap.java	Wed Nov 16 11:40:00 2016 +0100
@@ -40,7 +40,7 @@
     }
 
     protected Collection<V> createValueCollection() {
-        return new ArrayList<V>();
+        return new ArrayList<>();
     }
 
     @Override
--- a/jmh-core/src/main/java/org/openjdk/jmh/util/FileUtils.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/util/FileUtils.java	Wed Nov 16 11:40:00 2016 +0100
@@ -100,7 +100,7 @@
         try {
             fis = new FileInputStream(file);
             BufferedReader reader = new BufferedReader(new InputStreamReader(fis));
-            LinkedList<String> lines = new LinkedList<String>();
+            LinkedList<String> lines = new LinkedList<>();
             String line;
             while ((line = reader.readLine()) != null) {
                 lines.add(line);
@@ -116,7 +116,7 @@
 
     public static Collection<String> readAllLines(Reader src) throws IOException {
         BufferedReader reader = new BufferedReader(src);
-        List<String> lines = new ArrayList<String>();
+        List<String> lines = new ArrayList<>();
         String line;
         while ((line = reader.readLine()) != null) {
             lines.add(line);
@@ -158,7 +158,7 @@
     }
 
     public static void appendLines(File file, Collection<String> lines) throws IOException {
-        Collection<String> newLines = new ArrayList<String>();
+        Collection<String> newLines = new ArrayList<>();
         try {
             newLines.addAll(readAllLines(file));
         } catch (IOException e) {
@@ -169,12 +169,12 @@
     }
 
     public static Collection<File> getClasses(File root) {
-        Collection<File> result = new ArrayList<File>();
+        Collection<File> result = new ArrayList<>();
 
-        List<File> newDirs = new ArrayList<File>();
+        List<File> newDirs = new ArrayList<>();
         newDirs.add(root);
         while (!newDirs.isEmpty()) {
-            List<File> add = new ArrayList<File>();
+            List<File> add = new ArrayList<>();
             for (File dir : newDirs) {
                 File[] files = dir.listFiles();
                 if (files != null) {
--- a/jmh-core/src/main/java/org/openjdk/jmh/util/HashsetMultimap.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/util/HashsetMultimap.java	Wed Nov 16 11:40:00 2016 +0100
@@ -38,6 +38,6 @@
 
     @Override
     protected Collection<V> createValueCollection() {
-        return new HashSet<V>();
+        return new HashSet<>();
     }
 }
--- a/jmh-core/src/main/java/org/openjdk/jmh/util/InputStreamDrainer.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/util/InputStreamDrainer.java	Wed Nov 16 11:40:00 2016 +0100
@@ -57,7 +57,7 @@
      */
     public InputStreamDrainer(InputStream in, OutputStream out) {
         this.in = in;
-        outs = new ArrayList<OutputStream>();
+        this.outs = new ArrayList<>();
         addOutputStream(out);
     }
 
--- a/jmh-core/src/main/java/org/openjdk/jmh/util/IntervalMap.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/util/IntervalMap.java	Wed Nov 16 11:40:00 2016 +0100
@@ -32,7 +32,7 @@
     final SortedMap<Long, T> from;
 
     public IntervalMap() {
-        from = new TreeMap<Long, T>();
+        from = new TreeMap<>();
     }
 
     public void add(T val, long from, long to) {
--- a/jmh-core/src/main/java/org/openjdk/jmh/util/ListStatistics.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/util/ListStatistics.java	Wed Nov 16 11:40:00 2016 +0100
@@ -181,7 +181,7 @@
 
         @Override
         public Map.Entry<Double, Long> next() {
-            return new AbstractMap.SimpleImmutableEntry<Double, Long>(values[currentIndex++], 1L);
+            return new AbstractMap.SimpleImmutableEntry<>(values[currentIndex++], 1L);
         }
 
         @Override
--- a/jmh-core/src/main/java/org/openjdk/jmh/util/MultisetStatistics.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/util/MultisetStatistics.java	Wed Nov 16 11:40:00 2016 +0100
@@ -32,7 +32,7 @@
     private final Multiset<Double> values;
 
     public MultisetStatistics() {
-        values = new TreeMultiset<Double>();
+        values = new TreeMultiset<>();
     }
 
     public void addValue(double d, long count) {
@@ -118,7 +118,7 @@
             throw new IllegalArgumentException("Expected more than two levels");
         }
 
-        List<Double> vs = new ArrayList<Double>(values.keys());
+        List<Double> vs = new ArrayList<>(values.keys());
         Collections.sort(vs);
 
         int[] result = new int[levels.length - 1];
--- a/jmh-core/src/main/java/org/openjdk/jmh/util/Multisets.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/util/Multisets.java	Wed Nov 16 11:40:00 2016 +0100
@@ -29,7 +29,7 @@
 public class Multisets {
 
     public static <T> List<T> countHighest(Multiset<T> set, int top) {
-        Queue<Map.Entry<T, Long>> q = new BoundedPriorityQueue<Map.Entry<T, Long>>(top, new Comparator<Map.Entry<T, Long>>() {
+        Queue<Map.Entry<T, Long>> q = new BoundedPriorityQueue<>(top, new Comparator<Map.Entry<T, Long>>() {
             @Override
             public int compare(Map.Entry<T, Long> o1, Map.Entry<T, Long> o2) {
                 return o2.getValue().compareTo(o1.getValue());
@@ -38,7 +38,7 @@
 
         q.addAll(set.entrySet());
 
-        List<T> result = new ArrayList<T>(q.size());
+        List<T> result = new ArrayList<>(q.size());
 
         Map.Entry<T, Long> pair;
         while ((pair = q.poll()) != null) {
@@ -52,7 +52,7 @@
     }
 
     public static <T> List<T> sortedDesc(final Multiset<T> set) {
-        List<T> sorted = new ArrayList<T>();
+        List<T> sorted = new ArrayList<>();
         sorted.addAll(set.keys());
 
         Collections.sort(sorted, new Comparator<T>() {
--- a/jmh-core/src/main/java/org/openjdk/jmh/util/Optional.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/util/Optional.java	Wed Nov 16 11:40:00 2016 +0100
@@ -60,7 +60,7 @@
      * @return empty option
      */
     public static <T> Optional<T> none() {
-        return new Optional<T>();
+        return new Optional<>();
     }
 
     /**
@@ -70,7 +70,7 @@
      * @return option with value
      */
     public static <T> Optional<T> of(T val) {
-        return new Optional<T>(val);
+        return new Optional<>(val);
     }
 
     public static <T> Optional<T> eitherOf(T val) {
--- a/jmh-core/src/main/java/org/openjdk/jmh/util/SampleBuffer.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/util/SampleBuffer.java	Wed Nov 16 11:40:00 2016 +0100
@@ -42,8 +42,7 @@
     }
 
     public void half() {
-        for (int i = 0; i < hdr.length; i++) {
-            int[] bucket = hdr[i];
+        for (int[] bucket : hdr) {
             if (bucket != null) {
                 for (int j = 0; j < bucket.length; j++) {
                     int nV = bucket[j] / 2;
--- a/jmh-core/src/main/java/org/openjdk/jmh/util/SingletonStatistics.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/util/SingletonStatistics.java	Wed Nov 16 11:40:00 2016 +0100
@@ -99,7 +99,7 @@
         @Override
         public Map.Entry<Double, Long> next() {
             entryReturned = true;
-            return new AbstractMap.SimpleImmutableEntry<Double, Long>(value, 1L);
+            return new AbstractMap.SimpleImmutableEntry<>(value, 1L);
         }
 
         @Override
--- a/jmh-core/src/main/java/org/openjdk/jmh/util/Utils.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/util/Utils.java	Wed Nov 16 11:40:00 2016 +0100
@@ -46,9 +46,7 @@
             Field unsafe = Unsafe.class.getDeclaredField("theUnsafe");
             unsafe.setAccessible(true);
             U = (Unsafe) unsafe.get(null);
-        } catch (NoSuchFieldException e) {
-            throw new IllegalStateException(e);
-        } catch (IllegalAccessException e) {
+        } catch (NoSuchFieldException | IllegalAccessException e) {
             throw new IllegalStateException(e);
         }
     }
@@ -57,7 +55,7 @@
 
     }
 
-    private static final ConcurrentMap<String, Pattern> PATTERNS = new ConcurrentHashMap<String, Pattern>();
+    private static final ConcurrentMap<String, Pattern> PATTERNS = new ConcurrentHashMap<>();
 
     public static Pattern lazyCompile(String pattern) {
         Pattern patt = PATTERNS.get(pattern);
@@ -118,7 +116,7 @@
     }
 
     public static Collection<String> splitQuotedEscape(String src) {
-        List<String> results = new ArrayList<String>();
+        List<String> results = new ArrayList<>();
 
         StringBuilder sb = new StringBuilder();
         boolean escaped = false;
@@ -203,7 +201,7 @@
         int warmupTime = 1000;
         long lastChange = System.currentTimeMillis();
 
-        List<Future<?>> futures = new ArrayList<Future<?>>();
+        List<Future<?>> futures = new ArrayList<>();
         futures.add(service.submit(new BurningTask()));
 
         int max = 0;
@@ -312,7 +310,7 @@
     }
 
     public static Collection<String> rewrap(String lines) {
-        Collection<String> result = new ArrayList<String>();
+        Collection<String> result = new ArrayList<>();
         String[] words = lines.split("[ \n]");
         String line = "";
         int cols = 0;
@@ -421,7 +419,7 @@
     }
 
     public static Collection<String> tryWith(String... cmd) {
-        Collection<String> messages = new ArrayList<String>();
+        Collection<String> messages = new ArrayList<>();
         try {
             Process p = new ProcessBuilder(cmd).start();
 
@@ -451,7 +449,7 @@
     }
 
     public static Collection<String> runWith(List<String> cmd) {
-        Collection<String> messages = new ArrayList<String>();
+        Collection<String> messages = new ArrayList<>();
         try {
             Process p = new ProcessBuilder(cmd).start();
 
--- a/jmh-core/src/main/java/org/openjdk/jmh/util/lines/TestLineReader.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/util/lines/TestLineReader.java	Wed Nov 16 11:40:00 2016 +0100
@@ -139,7 +139,7 @@
             return Optional.none();
         } else if (tag == TAG_STRING_COLLECTION) {
             int len = readLen();
-            Collection<String> list = new ArrayList<String>();
+            Collection<String> list = new ArrayList<>();
             for (int c = 0; c < len; c++) {
                 list.add(readString());
             }
@@ -168,7 +168,7 @@
         if (tag == Constants.TAG_EMPTY_OPTIONAL) {
             return Optional.none();
         } else if (tag == TAG_PARAM_MAP) {
-            Map<String, String[]> result = new HashMap<String, String[]>();
+            Map<String, String[]> result = new HashMap<>();
 
             int kvs = readLen();
             for (int kv = 0; kv < kvs; kv++) {
--- a/jmh-core/src/test/java/org/openjdk/jmh/results/format/ResultFormatTest.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/test/java/org/openjdk/jmh/results/format/ResultFormatTest.java	Wed Nov 16 11:40:00 2016 +0100
@@ -47,7 +47,7 @@
 public class ResultFormatTest {
 
     private Collection<RunResult> getStub() {
-        Collection<RunResult> results = new TreeSet<RunResult>(RunResult.DEFAULT_SORT_COMPARATOR);
+        Collection<RunResult> results = new TreeSet<>(RunResult.DEFAULT_SORT_COMPARATOR);
 
         Random r = new Random(12345);
         Random ar = new Random(12345);
@@ -74,9 +74,9 @@
                     Collections.<String>emptyList(),
                     TimeValue.days(1));
 
-            Collection<BenchmarkResult> benchmarkResults = new ArrayList<BenchmarkResult>();
+            Collection<BenchmarkResult> benchmarkResults = new ArrayList<>();
             for (int f = 0; f < r.nextInt(10); f++) {
-                Collection<IterationResult> iterResults = new ArrayList<IterationResult>();
+                Collection<IterationResult> iterResults = new ArrayList<>();
                 for (int c = 0; c < r.nextInt(10); c++) {
                     IterationResult res = new IterationResult(params, params.getMeasurement(), null);
                     res.addResult(new ThroughputResult(ResultRole.PRIMARY, "test", r.nextInt(1000), 1000 * 1000, TimeUnit.MILLISECONDS));
--- a/jmh-core/src/test/java/org/openjdk/jmh/runner/CompilerHintsTest.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/test/java/org/openjdk/jmh/runner/CompilerHintsTest.java	Wed Nov 16 11:40:00 2016 +0100
@@ -47,7 +47,7 @@
     public void testListNotEmptyForCompliantJvms() {
         for (String name : CompilerHints.HINT_COMPATIBLE_JVMS) {
             System.setProperty("java.vm.name", name);
-            List<String> args = new ArrayList<String>();
+            List<String> args = new ArrayList<>();
             CompilerHints.addCompilerHints(args);
             assertFalse(args.isEmpty());
         }
@@ -58,7 +58,7 @@
         System.setProperty("java.vm.name", "Zing");
         System.setProperty("java.version", "1.7.0-zing_5.9.2.0");
         // load up some default hints
-        List<String> args = new ArrayList<String>();
+        List<String> args = new ArrayList<>();
         CompilerHints.addCompilerHints(args);
         assertTrue(args.isEmpty());
     }
@@ -68,7 +68,7 @@
         System.setProperty("java.vm.name", "Zing");
         System.setProperty("java.version", "1.7.0-zing_5.10.2.0");
         // load up some default hints
-        List<String> args = new ArrayList<String>();
+        List<String> args = new ArrayList<>();
         CompilerHints.addCompilerHints(args);
         assertFalse(args.isEmpty());
     }
@@ -76,7 +76,7 @@
     @Test
     public void testListEmptyForNonCompliantJvms() {
         System.setProperty("java.vm.name", "StupidVmCantTakeAHint");
-        List<String> args = new ArrayList<String>();
+        List<String> args = new ArrayList<>();
         CompilerHints.addCompilerHints(args);
         assertTrue(args.isEmpty());
     }
--- a/jmh-core/src/test/java/org/openjdk/jmh/util/BoundedPriorityQueueTest.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/test/java/org/openjdk/jmh/util/BoundedPriorityQueueTest.java	Wed Nov 16 11:40:00 2016 +0100
@@ -33,7 +33,7 @@
 public class BoundedPriorityQueueTest {
     @Test
     public void top3Smallest() {
-        Queue<Integer> queue = new BoundedPriorityQueue<Integer>(3);
+        Queue<Integer> queue = new BoundedPriorityQueue<>(3);
         queue.add(50);
         queue.add(40);
         queue.add(10);
@@ -50,7 +50,7 @@
 
     @Test
     public void top3Largest() {
-        Queue<Integer> queue = new BoundedPriorityQueue<Integer>(3, Collections.reverseOrder());
+        Queue<Integer> queue = new BoundedPriorityQueue<>(3, Collections.reverseOrder());
         queue.add(50);
         queue.add(40);
         queue.add(10);
--- a/jmh-core/src/test/java/org/openjdk/jmh/util/MultisetsTest.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/test/java/org/openjdk/jmh/util/MultisetsTest.java	Wed Nov 16 11:40:00 2016 +0100
@@ -32,7 +32,7 @@
 public class MultisetsTest {
     @Test
     public void testCountHighest() {
-        Multiset<Integer> set = new HashMultiset<Integer>();
+        Multiset<Integer> set = new HashMultiset<>();
         set.add(10);
         set.add(10);
         set.add(10);
@@ -50,7 +50,7 @@
     public void testCountHighest_2() {
         // Regression test for CODETOOLS-7901411
 
-        Multiset<String> set = new HashMultiset<String>();
+        Multiset<String> set = new HashMultiset<>();
         set.add("Meh", 85);
         set.add("Blah", 17);
         set.add("Choo", 1);
@@ -65,7 +65,7 @@
 
     @Test
     public void testSortedDesc() {
-        Multiset<Integer> set = new HashMultiset<Integer>();
+        Multiset<Integer> set = new HashMultiset<>();
         set.add(10);
         set.add(10);
         set.add(10);
--- a/jmh-core/src/test/java/org/openjdk/jmh/util/TestLineTest.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-core/src/test/java/org/openjdk/jmh/util/TestLineTest.java	Wed Nov 16 11:40:00 2016 +0100
@@ -61,7 +61,7 @@
         writer.putOptionalStringCollection(Optional.<Collection<String>>eitherOf(Arrays.asList("foo", "bar", "baz")));
         writer.putOptionalStringCollection(Optional.<Collection<String>>none());
 
-        HashMap<String, String[]> expectedMap = new HashMap<String, String[]>();
+        HashMap<String, String[]> expectedMap = new HashMap<>();
         expectedMap.put("key1", new String[] {"val1", "val2"});
         expectedMap.put("key2", new String[] {"val3", "val4"});
         writer.putOptionalParamCollection(Optional.<Map<String,String[]>>eitherOf(expectedMap));
--- a/jmh-generator-annprocess/src/main/java/org/openjdk/jmh/generators/annotations/APClassInfo.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-generator-annprocess/src/main/java/org/openjdk/jmh/generators/annotations/APClassInfo.java	Wed Nov 16 11:40:00 2016 +0100
@@ -81,7 +81,7 @@
     @Override
     public Collection<MethodInfo> getConstructors() {
         if (isSpecial) return Collections.emptyList();
-        Collection<MethodInfo> mis = new ArrayList<MethodInfo>();
+        Collection<MethodInfo> mis = new ArrayList<>();
         for (ExecutableElement e : ElementFilter.constructorsIn(el.getEnclosedElements())) {
             mis.add(new APMethodInfo(processEnv, this, e));
         }
@@ -103,7 +103,7 @@
     @Override
     public Collection<FieldInfo> getFields() {
         if (isSpecial) return Collections.emptyList();
-        List<FieldInfo> ls = new ArrayList<FieldInfo>();
+        List<FieldInfo> ls = new ArrayList<>();
         for (VariableElement e : ElementFilter.fieldsIn(el.getEnclosedElements())) {
             ls.add(new APFieldInfo(processEnv, e));
         }
@@ -113,7 +113,7 @@
     @Override
     public Collection<MethodInfo> getMethods() {
         if (isSpecial) return Collections.emptyList();
-        Collection<MethodInfo> mis = new ArrayList<MethodInfo>();
+        Collection<MethodInfo> mis = new ArrayList<>();
         for (ExecutableElement e : ElementFilter.methodsIn(el.getEnclosedElements())) {
             mis.add(new APMethodInfo(processEnv, this, e));
         }
@@ -191,7 +191,7 @@
 
     @Override
     public Collection<String> getEnumConstants() {
-        Collection<String> result = new ArrayList<String>();
+        Collection<String> result = new ArrayList<>();
         for (Element e : el.getEnclosedElements()) {
             if (e.getKind() == ElementKind.ENUM_CONSTANT) {
                 result.add(e.getSimpleName().toString());
--- a/jmh-generator-annprocess/src/main/java/org/openjdk/jmh/generators/annotations/APGeneratorSource.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-generator-annprocess/src/main/java/org/openjdk/jmh/generators/annotations/APGeneratorSource.java	Wed Nov 16 11:40:00 2016 +0100
@@ -57,7 +57,7 @@
             return classInfos;
         }
 
-        Collection<TypeElement> discoveredClasses = new TreeSet<TypeElement>(new Comparator<TypeElement>() {
+        Collection<TypeElement> discoveredClasses = new TreeSet<>(new Comparator<TypeElement>() {
             @Override
             public int compare(TypeElement o1, TypeElement o2) {
                 return o1.getQualifiedName().toString().compareTo(o2.getQualifiedName().toString());
@@ -78,7 +78,7 @@
         int lastSize = 0;
         while (discoveredClasses.size() > lastSize) {
             lastSize = discoveredClasses.size();
-            List<TypeElement> newClasses = new ArrayList<TypeElement>();
+            List<TypeElement> newClasses = new ArrayList<>();
             for (Element e : discoveredClasses) {
                 try {
                     TypeElement walk = (TypeElement) e;
@@ -110,7 +110,7 @@
     }
 
     protected Collection<ClassInfo> convert(Collection<TypeElement> els) {
-        List<ClassInfo> list = new ArrayList<ClassInfo>();
+        List<ClassInfo> list = new ArrayList<>();
         for (TypeElement el : els) {
             list.add(new APClassInfo(processingEnv, el));
         }
--- a/jmh-generator-annprocess/src/main/java/org/openjdk/jmh/generators/annotations/APMethodInfo.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-generator-annprocess/src/main/java/org/openjdk/jmh/generators/annotations/APMethodInfo.java	Wed Nov 16 11:40:00 2016 +0100
@@ -70,7 +70,7 @@
 
     @Override
     public Collection<ParameterInfo> getParameters() {
-        Collection<ParameterInfo> pis = new ArrayList<ParameterInfo>();
+        Collection<ParameterInfo> pis = new ArrayList<>();
         for (VariableElement v : el.getParameters()) {
             pis.add(new APParameterInfo(processEnv, v));
         }
--- a/jmh-generator-asm/src/main/java/org/openjdk/jmh/generators/asm/ASMClassInfo.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-generator-asm/src/main/java/org/openjdk/jmh/generators/asm/ASMClassInfo.java	Wed Nov 16 11:40:00 2016 +0100
@@ -54,7 +54,7 @@
     private final List<MethodInfo> methods;
     private final List<MethodInfo> constructors;
     private final List<FieldInfo> fields;
-    private final Map<String, AnnotationInvocationHandler> annotations = new HashMap<String, AnnotationInvocationHandler>();
+    private final Map<String, AnnotationInvocationHandler> annotations = new HashMap<>();
     private final ClassInfoRepo classInfos;
     private String superName;
     private String declaringClass;
@@ -64,9 +64,9 @@
     public ASMClassInfo(ClassInfoRepo classInfos) {
         super(Opcodes.ASM4);
         this.classInfos = classInfos;
-        methods = new ArrayList<MethodInfo>();
-        constructors = new ArrayList<MethodInfo>();
-        fields = new ArrayList<FieldInfo>();
+        this.methods = new ArrayList<>();
+        this.constructors = new ArrayList<>();
+        this.fields = new ArrayList<>();
     }
 
     public String getIdName() {
@@ -219,7 +219,7 @@
     public Collection<String> getEnumConstants() {
         if (isEnum()) {
             try {
-                Collection<String> res = new ArrayList<String>();
+                Collection<String> res = new ArrayList<>();
                 for (Object cnst : Class.forName(origQualifiedName, false, Thread.currentThread().getContextClassLoader()).getEnumConstants()) {
                     res.add(cnst.toString());
                 }
--- a/jmh-generator-asm/src/main/java/org/openjdk/jmh/generators/asm/ASMFieldInfo.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-generator-asm/src/main/java/org/openjdk/jmh/generators/asm/ASMFieldInfo.java	Wed Nov 16 11:40:00 2016 +0100
@@ -50,7 +50,7 @@
         this.access = access;
         this.name = name;
         this.type = type;
-        this.annotations = new HashMap<String, AnnotationInvocationHandler>();
+        this.annotations = new HashMap<>();
     }
 
     @Override
--- a/jmh-generator-asm/src/main/java/org/openjdk/jmh/generators/asm/ASMMethodInfo.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-generator-asm/src/main/java/org/openjdk/jmh/generators/asm/ASMMethodInfo.java	Wed Nov 16 11:40:00 2016 +0100
@@ -56,7 +56,7 @@
         this.access = access;
         this.name = name;
         this.returnType = Type.getReturnType(desc).getClassName();
-        this.annotations = new HashMap<String, AnnotationInvocationHandler>();
+        this.annotations = new HashMap<>();
         this.argumentTypes = Type.getArgumentTypes(desc);
     }
 
@@ -103,7 +103,7 @@
 
     @Override
     public Collection<ParameterInfo> getParameters() {
-        Collection<ParameterInfo> result = new ArrayList<ParameterInfo>();
+        Collection<ParameterInfo> result = new ArrayList<>();
         for (Type t : argumentTypes) {
             ClassInfo ci = repo.get(t.getClassName());
             result.add(new ASMParameterInfo(ci));
--- a/jmh-generator-asm/src/main/java/org/openjdk/jmh/generators/asm/AnnotationInvocationHandler.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-generator-asm/src/main/java/org/openjdk/jmh/generators/asm/AnnotationInvocationHandler.java	Wed Nov 16 11:40:00 2016 +0100
@@ -44,7 +44,7 @@
     public AnnotationInvocationHandler(String className, AnnotationVisitor annotationVisitor) {
         super(Opcodes.ASM4, annotationVisitor);
         this.className = className;
-        this.values = new HashMultimap<String, Object>();
+        this.values = new HashMultimap<>();
     }
 
     @Override
@@ -58,12 +58,13 @@
             return equalsImpl(args[0]);
         if (paramTypes.length != 0)
             throw new AssertionError("Too many parameters for an annotation method");
-        if (member.equals("toString")) {
-            return toStringImpl();
-        } else if (member.equals("hashCode")) {
-            return hashcodeImpl();
-        } else if (member.equals("annotationType")) {
-            throw new IllegalStateException("annotationType is not implemented");
+        switch (member) {
+            case "toString":
+                return toStringImpl();
+            case "hashCode":
+                return hashcodeImpl();
+            case "annotationType":
+                throw new IllegalStateException("annotationType is not implemented");
         }
 
         /*
@@ -162,7 +163,7 @@
                 return false;
             }
 
-            Set<String> keys = new HashSet<String>();
+            Set<String> keys = new HashSet<>();
             keys.addAll(values.keys());
             keys.addAll(other.values.keys());
 
--- a/jmh-generator-asm/src/main/java/org/openjdk/jmh/generators/asm/ClassInfoRepo.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-generator-asm/src/main/java/org/openjdk/jmh/generators/asm/ClassInfoRepo.java	Wed Nov 16 11:40:00 2016 +0100
@@ -33,7 +33,7 @@
 
 class ClassInfoRepo {
 
-    private final Map<String, ClassInfo> map = new HashMap<String, ClassInfo>();
+    private final Map<String, ClassInfo> map = new HashMap<>();
 
     public ClassInfo get(String desc) {
         desc = desc.replace('/', '.');
--- a/jmh-generator-reflection/src/main/java/org/openjdk/jmh/generators/reflection/RFClassInfo.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-generator-reflection/src/main/java/org/openjdk/jmh/generators/reflection/RFClassInfo.java	Wed Nov 16 11:40:00 2016 +0100
@@ -77,7 +77,7 @@
 
     @Override
     public Collection<FieldInfo> getFields() {
-        Collection<FieldInfo> fis = new ArrayList<FieldInfo>();
+        Collection<FieldInfo> fis = new ArrayList<>();
         for (Field f : klass.getDeclaredFields()) {
             fis.add(new RFFieldInfo(this, f));
         }
@@ -86,7 +86,7 @@
 
     @Override
     public Collection<MethodInfo> getConstructors() {
-        Collection<MethodInfo> mis = new ArrayList<MethodInfo>();
+        Collection<MethodInfo> mis = new ArrayList<>();
         for (Constructor m : klass.getDeclaredConstructors()) {
             mis.add(new RFConstructorInfo(this, m));
         }
@@ -95,7 +95,7 @@
 
     @Override
     public Collection<MethodInfo> getMethods() {
-        Collection<MethodInfo> mis = new ArrayList<MethodInfo>();
+        Collection<MethodInfo> mis = new ArrayList<>();
         for (Method m : klass.getDeclaredMethods()) {
             mis.add(new RFMethodInfo(this, m));
         }
@@ -160,7 +160,7 @@
 
     @Override
     public Collection<String> getEnumConstants() {
-        Collection<String> res = new ArrayList<String>();
+        Collection<String> res = new ArrayList<>();
         for (Object cnst : klass.getEnumConstants()) {
             res.add(cnst.toString());
         }
--- a/jmh-generator-reflection/src/main/java/org/openjdk/jmh/generators/reflection/RFConstructorInfo.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-generator-reflection/src/main/java/org/openjdk/jmh/generators/reflection/RFConstructorInfo.java	Wed Nov 16 11:40:00 2016 +0100
@@ -66,7 +66,7 @@
 
     @Override
     public Collection<ParameterInfo> getParameters() {
-        Collection<ParameterInfo> pis = new ArrayList<ParameterInfo>();
+        Collection<ParameterInfo> pis = new ArrayList<>();
         for (Class<?> cl : m.getParameterTypes()) {
             pis.add(new RFParameterInfo(cl));
         }
--- a/jmh-generator-reflection/src/main/java/org/openjdk/jmh/generators/reflection/RFGeneratorSource.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-generator-reflection/src/main/java/org/openjdk/jmh/generators/reflection/RFGeneratorSource.java	Wed Nov 16 11:40:00 2016 +0100
@@ -36,12 +36,12 @@
     private final Collection<Class> classes;
 
     public RFGeneratorSource() {
-        this.classes = new ArrayList<Class>();
+        this.classes = new ArrayList<>();
     }
 
     @Override
     public Collection<ClassInfo> getClasses() {
-        Collection<ClassInfo> cis = new ArrayList<ClassInfo>();
+        Collection<ClassInfo> cis = new ArrayList<>();
         for (Class c : classes) {
             cis.add(new RFClassInfo(c));
         }
--- a/jmh-generator-reflection/src/main/java/org/openjdk/jmh/generators/reflection/RFMethodInfo.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-generator-reflection/src/main/java/org/openjdk/jmh/generators/reflection/RFMethodInfo.java	Wed Nov 16 11:40:00 2016 +0100
@@ -66,7 +66,7 @@
 
     @Override
     public Collection<ParameterInfo> getParameters() {
-        Collection<ParameterInfo> pis = new ArrayList<ParameterInfo>();
+        Collection<ParameterInfo> pis = new ArrayList<>();
         for (Class<?> cl : m.getParameterTypes()) {
             pis.add(new RFParameterInfo(cl));
         }
--- a/jmh-samples/src/main/java/org/openjdk/jmh/samples/JMHSample_25_API_GA.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-samples/src/main/java/org/openjdk/jmh/samples/JMHSample_25_API_GA.java	Wed Nov 16 11:40:00 2016 +0100
@@ -162,7 +162,7 @@
      * Population.
      */
     public static class Population {
-        private final List<Chromosome> list = new ArrayList<Chromosome>();
+        private final List<Chromosome> list = new ArrayList<>();
 
         public void addChromosome(Chromosome c) {
             list.add(c);
--- a/jmh-samples/src/main/java/org/openjdk/jmh/samples/JMHSample_26_BatchSize.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-samples/src/main/java/org/openjdk/jmh/samples/JMHSample_26_BatchSize.java	Wed Nov 16 11:40:00 2016 +0100
@@ -69,7 +69,7 @@
      * Suppose we want to measure insertion in the middle of the list.
      */
 
-    List<String> list = new LinkedList<String>();
+    List<String> list = new LinkedList<>();
 
     @Benchmark
     @Warmup(iterations = 5, time = 1)
--- a/jmh-samples/src/main/java/org/openjdk/jmh/samples/JMHSample_29_StatesDAG.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-samples/src/main/java/org/openjdk/jmh/samples/JMHSample_29_StatesDAG.java	Wed Nov 16 11:40:00 2016 +0100
@@ -109,12 +109,12 @@
 
         @Setup
         public synchronized void setup() {
-            all = new ArrayList<Counter>();
+            all = new ArrayList<>();
             for (int c = 0; c < 10; c++) {
                 all.add(new Counter());
             }
 
-            available = new LinkedList<Counter>();
+            available = new LinkedList<>();
             available.addAll(all);
         }
 
--- a/jmh-samples/src/main/java/org/openjdk/jmh/samples/JMHSample_30_Interrupts.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-samples/src/main/java/org/openjdk/jmh/samples/JMHSample_30_Interrupts.java	Wed Nov 16 11:40:00 2016 +0100
@@ -79,7 +79,7 @@
 
     @Setup
     public void setup() {
-        q = new ArrayBlockingQueue<Integer>(1);
+        q = new ArrayBlockingQueue<>(1);
     }
 
     @Group("Q")
--- a/jmh-samples/src/main/java/org/openjdk/jmh/samples/JMHSample_31_InfraParams.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-samples/src/main/java/org/openjdk/jmh/samples/JMHSample_31_InfraParams.java	Wed Nov 16 11:40:00 2016 +0100
@@ -76,8 +76,8 @@
     @Setup
     public void setup(BenchmarkParams params) {
         int capacity = 16 * THREAD_SLICE * params.getThreads();
-        mapSingle        = new ConcurrentHashMap<String, String>(capacity, 0.75f, 1);
-        mapFollowThreads = new ConcurrentHashMap<String, String>(capacity, 0.75f, params.getThreads());
+        mapSingle        = new ConcurrentHashMap<>(capacity, 0.75f, 1);
+        mapFollowThreads = new ConcurrentHashMap<>(capacity, 0.75f, params.getThreads());
     }
 
     /*
@@ -90,7 +90,7 @@
 
         @Setup
         public void setup(ThreadParams threads) {
-            ids = new ArrayList<String>();
+            ids = new ArrayList<>();
             for (int c = 0; c < THREAD_SLICE; c++) {
                 ids.add("ID" + (THREAD_SLICE * threads.getThreadIndex() + c));
             }
--- a/jmh-samples/src/main/java/org/openjdk/jmh/samples/JMHSample_35_Profilers.java	Wed Nov 16 11:27:48 2016 +0100
+++ b/jmh-samples/src/main/java/org/openjdk/jmh/samples/JMHSample_35_Profilers.java	Wed Nov 16 11:40:00 2016 +0100
@@ -89,12 +89,15 @@
 
         @Setup
         public void setup() {
-            if (type.equals("hashmap")) {
-                map = new HashMap<Integer, Integer>();
-            } else if (type.equals("treemap")) {
-                map = new TreeMap<Integer, Integer>();
-            } else {
-                throw new IllegalStateException("Unknown type: " + type);
+            switch (type) {
+                case "hashmap":
+                    map = new HashMap<>();
+                    break;
+                case "treemap":
+                    map = new TreeMap<>();
+                    break;
+                default:
+                    throw new IllegalStateException("Unknown type: " + type);
             }
 
             begin = 1;