changeset 1372:548d8d867582

Fix code inspection problems: redundant modifiers, final fields, etc.
author shade
date Wed, 16 Nov 2016 21:10:51 +0100
parents 00f2c71a3d71
children 1a97ad3ab3f5
files jmh-core-benchmarks/src/main/java/org/openjdk/jmh/validation/Main.java jmh-core-benchmarks/src/main/java/org/openjdk/jmh/validation/tests/ThermalRundownTest.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/StackTraceInThrowableTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/annsteal/CustomTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/asymm/ExactThreadCountTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/asymm/Zero1ThreadCountTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/asymm/Zero2ThreadCountTest.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/parameters/Parameters.java jmh-core-it/src/test/java/org/openjdk/jmh/it/params/EnumBenchParamImplicitSequenceTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/params/EnumParamSequenceTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/params/EnumStateParamImplicitSequenceTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/params/nested/NestedSubclassDependencyTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/params/nested/NestedTearDownDependencyTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/sharing/BenchmarkBenchSharingTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/sharing/BenchmarkStateSharingTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/sharing/GroupBenchSharingTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/sharing/GroupDefaultBenchSharingTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/sharing/GroupDefaultStateSharingTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/sharing/GroupStateSharingTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/sharing/ThreadBenchSharingTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/sharing/ThreadStateSharingTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/threads/BenchmarkBenchSameThreadTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/threads/BenchmarkStateSameThreadTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/threads/GroupBenchSameThreadTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/threads/GroupStateSameThreadTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/threads/GroupThreadGroupOrderTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/threads/MaxThreadCountTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/threads/OneThreadCountTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/threads/TwoThreadCountTest.java jmh-core/src/main/java/org/openjdk/jmh/annotations/CompilerControl.java jmh-core/src/main/java/org/openjdk/jmh/annotations/Fork.java jmh-core/src/main/java/org/openjdk/jmh/annotations/Measurement.java jmh-core/src/main/java/org/openjdk/jmh/annotations/Param.java jmh-core/src/main/java/org/openjdk/jmh/annotations/Threads.java jmh-core/src/main/java/org/openjdk/jmh/annotations/Warmup.java jmh-core/src/main/java/org/openjdk/jmh/infra/BenchmarkParams.java jmh-core/src/main/java/org/openjdk/jmh/profile/LinuxPerfProfiler.java jmh-core/src/main/java/org/openjdk/jmh/profile/PausesProfiler.java jmh-core/src/main/java/org/openjdk/jmh/profile/ProfilerFactory.java jmh-core/src/main/java/org/openjdk/jmh/profile/ProfilerOptionFormatter.java jmh-core/src/main/java/org/openjdk/jmh/results/AggregationPolicy.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/WorkloadParams.java jmh-core/src/main/java/org/openjdk/jmh/runner/format/OutputFormat.java jmh-core/src/main/java/org/openjdk/jmh/runner/link/OutputFrame.java jmh-core/src/main/java/org/openjdk/jmh/runner/options/OptionsBuilder.java jmh-core/src/main/java/org/openjdk/jmh/util/Utils.java jmh-core/src/main/java/org/openjdk/jmh/util/lines/TestLineWriter.java jmh-core/src/test/java/org/openjdk/jmh/runner/RunnerTest.java jmh-core/src/test/java/org/openjdk/jmh/runner/TestBenchmarkList.java jmh-core/src/test/java/org/openjdk/jmh/runner/options/TestParentOptions.java jmh-core/src/test/java/org/openjdk/jmh/util/TestClassUtils.java jmh-generator-annprocess/src/main/java/org/openjdk/jmh/generators/BenchmarkProcessor.java jmh-generator-annprocess/src/main/java/org/openjdk/jmh/generators/annotations/APGeneratorDestinaton.java
diffstat 65 files changed, 146 insertions(+), 173 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-core-benchmarks/src/main/java/org/openjdk/jmh/validation/Main.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core-benchmarks/src/main/java/org/openjdk/jmh/validation/Main.java	Wed Nov 16 21:10:51 2016 +0100
@@ -216,7 +216,7 @@
         }
     }
 
-    public static enum Test {
+    public enum Test {
         timing,
         compiler_hints,
         thermal,
@@ -229,7 +229,7 @@
         blackhole_consec,
     }
 
-    public static enum Mode {
+    public enum Mode {
         flash,
         quick,
         normal,
--- a/jmh-core-benchmarks/src/main/java/org/openjdk/jmh/validation/tests/ThermalRundownTest.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core-benchmarks/src/main/java/org/openjdk/jmh/validation/tests/ThermalRundownTest.java	Wed Nov 16 21:10:51 2016 +0100
@@ -39,7 +39,7 @@
 
 public class ThermalRundownTest implements ValidationTest {
 
-    private int iterations;
+    private final int iterations;
 
     public ThermalRundownTest(int iterations) {
         this.iterations = iterations;
--- a/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/CompileTest.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/CompileTest.java	Wed Nov 16 21:10:51 2016 +0100
@@ -111,11 +111,6 @@
         gen.complete(source, destination);
 
         if (destination.hasErrors()) {
-            StringBuilder sb = new StringBuilder();
-            sb.append("Failed with:\n");
-            for (String e : destination.getErrors()) {
-                sb.append(e).append("\n");
-            }
             return false;
         }
 
--- a/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/InMemoryGeneratorDestination.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/InMemoryGeneratorDestination.java	Wed Nov 16 21:10:51 2016 +0100
@@ -40,12 +40,12 @@
 
 public class InMemoryGeneratorDestination implements GeneratorDestination {
 
-    private List<String> errors = new ArrayList<>();
-    private List<String> warnings = new ArrayList<>();
-    private List<String> infos = new ArrayList<>();
+    private final List<String> errors = new ArrayList<>();
+    private final List<String> warnings = new ArrayList<>();
+    private final List<String> infos = new ArrayList<>();
 
-    private Map<String, StringWriter> classBodies = new HashMap<>();
-    private Map<String, StringWriter> resourceBodies = new HashMap<>();
+    private final Map<String, StringWriter> classBodies = new HashMap<>();
+    private final Map<String, StringWriter> resourceBodies = new HashMap<>();
 
     @Override
     public Writer newResource(String resourcePath) throws IOException {
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/StackTraceInThrowableTest.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/StackTraceInThrowableTest.java	Wed Nov 16 21:10:51 2016 +0100
@@ -24,18 +24,14 @@
  */
 package org.openjdk.jmh.it;
 
-import org.junit.Assert;
 import org.junit.Test;
 import org.openjdk.jmh.annotations.Benchmark;
 import org.openjdk.jmh.annotations.BenchmarkMode;
 import org.openjdk.jmh.annotations.Fork;
-import org.openjdk.jmh.annotations.Level;
 import org.openjdk.jmh.annotations.Measurement;
 import org.openjdk.jmh.annotations.Mode;
 import org.openjdk.jmh.annotations.Scope;
-import org.openjdk.jmh.annotations.Setup;
 import org.openjdk.jmh.annotations.State;
-import org.openjdk.jmh.annotations.TearDown;
 import org.openjdk.jmh.annotations.Warmup;
 import org.openjdk.jmh.runner.Runner;
 import org.openjdk.jmh.runner.RunnerException;
@@ -43,7 +39,6 @@
 import org.openjdk.jmh.runner.options.OptionsBuilder;
 
 import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
 
 
 @State(Scope.Thread)
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/annsteal/CustomTest.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/annsteal/CustomTest.java	Wed Nov 16 21:10:51 2016 +0100
@@ -28,9 +28,7 @@
 import org.junit.Assert;
 import org.openjdk.jmh.annotations.Benchmark;
 import org.openjdk.jmh.util.FileUtils;
-import org.openjdk.jmh.util.Utils;
 
-import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.Collection;
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/asymm/ExactThreadCountTest.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/asymm/ExactThreadCountTest.java	Wed Nov 16 21:10:51 2016 +0100
@@ -57,8 +57,8 @@
 @Fork(1)
 public class ExactThreadCountTest {
 
-    private Set<Thread> test1threads = Collections.synchronizedSet(new HashSet<Thread>());
-    private Set<Thread> test2threads = Collections.synchronizedSet(new HashSet<Thread>());
+    private final Set<Thread> test1threads = Collections.synchronizedSet(new HashSet<Thread>());
+    private final Set<Thread> test2threads = Collections.synchronizedSet(new HashSet<Thread>());
 
     @Setup(Level.Iteration)
     public void setup() {
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/asymm/Zero1ThreadCountTest.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/asymm/Zero1ThreadCountTest.java	Wed Nov 16 21:10:51 2016 +0100
@@ -55,8 +55,8 @@
 @Fork(1)
 public class Zero1ThreadCountTest {
 
-    private Set<Thread> test1threads = Collections.synchronizedSet(new HashSet<Thread>());
-    private Set<Thread> test2threads = Collections.synchronizedSet(new HashSet<Thread>());
+    private final Set<Thread> test1threads = Collections.synchronizedSet(new HashSet<Thread>());
+    private final Set<Thread> test2threads = Collections.synchronizedSet(new HashSet<Thread>());
 
     @TearDown
     public void check() {
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/asymm/Zero2ThreadCountTest.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/asymm/Zero2ThreadCountTest.java	Wed Nov 16 21:10:51 2016 +0100
@@ -55,8 +55,8 @@
 @Fork(1)
 public class Zero2ThreadCountTest {
 
-    private Set<Thread> test1threads = Collections.synchronizedSet(new HashSet<Thread>());
-    private Set<Thread> test2threads = Collections.synchronizedSet(new HashSet<Thread>());
+    private final Set<Thread> test1threads = Collections.synchronizedSet(new HashSet<Thread>());
+    private final Set<Thread> test2threads = Collections.synchronizedSet(new HashSet<Thread>());
 
     @TearDown
     public void check() {
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/bulkwarmup/NonForkedModesTest.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/bulkwarmup/NonForkedModesTest.java	Wed Nov 16 21:10:51 2016 +0100
@@ -48,7 +48,7 @@
 @State(Scope.Thread)
 public class NonForkedModesTest {
 
-    private static Queue<String> testSequence = new ConcurrentLinkedQueue<>();
+    private static final 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 14:51:34 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/bulkwarmup/WarmupMode0_Test.java	Wed Nov 16 21:10:51 2016 +0100
@@ -54,7 +54,7 @@
 @State(Scope.Thread)
 public class WarmupMode0_Test {
 
-    private static Queue<String> testSequence = new ConcurrentLinkedQueue<>();
+    private static final 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 14:51:34 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/bulkwarmup/WarmupMode1_Test.java	Wed Nov 16 21:10:51 2016 +0100
@@ -54,7 +54,7 @@
 @State(Scope.Thread)
 public class WarmupMode1_Test {
 
-    private static Queue<String> testSequence = new ConcurrentLinkedQueue<>();
+    private static final 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 14:51:34 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/bulkwarmup/WarmupMode2_Test.java	Wed Nov 16 21:10:51 2016 +0100
@@ -54,7 +54,7 @@
 @State(Scope.Thread)
 public class WarmupMode2_Test {
 
-    private static Queue<String> testSequence = new ConcurrentLinkedQueue<>();
+    private static final 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 14:51:34 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/bulkwarmup/WarmupMode3_Test.java	Wed Nov 16 21:10:51 2016 +0100
@@ -54,7 +54,7 @@
 @State(Scope.Thread)
 public class WarmupMode3_Test {
 
-    private static Queue<String> testSequence = new ConcurrentLinkedQueue<>();
+    private static final 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 14:51:34 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/bulkwarmup/WarmupMode4_Test.java	Wed Nov 16 21:10:51 2016 +0100
@@ -54,7 +54,7 @@
 @State(Scope.Thread)
 public class WarmupMode4_Test {
 
-    private static Queue<String> testSequence = new ConcurrentLinkedQueue<>();
+    private static final 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 14:51:34 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/bulkwarmup/WarmupMode5_Test.java	Wed Nov 16 21:10:51 2016 +0100
@@ -55,7 +55,7 @@
 @State(Scope.Thread)
 public class WarmupMode5_Test {
 
-    private static Queue<String> testSequence = new ConcurrentLinkedQueue<>();
+    private static final 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 14:51:34 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/bulkwarmup/WarmupMode6_Test.java	Wed Nov 16 21:10:51 2016 +0100
@@ -55,7 +55,7 @@
 @State(Scope.Thread)
 public class WarmupMode6_Test {
 
-    private static Queue<String> testSequence = new ConcurrentLinkedQueue<>();
+    private static final Queue<String> testSequence = new ConcurrentLinkedQueue<>();
 
     boolean recorded;
 
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/parameters/Parameters.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/parameters/Parameters.java	Wed Nov 16 21:10:51 2016 +0100
@@ -38,7 +38,9 @@
 
     public static BenchmarkListEntry get(Class<?> klass) {
         BenchmarkList list = BenchmarkList.fromFile("target/test-classes" + BenchmarkList.BENCHMARK_LIST);
-        Set<BenchmarkListEntry> set = list.find(OutputFormatFactory.createFormatInstance(System.out, VerboseMode.EXTRA), Arrays.asList(klass.getName().replaceAll("\\$",".")), Collections.<String>emptyList());
+        Set<BenchmarkListEntry> set = list.find(OutputFormatFactory.createFormatInstance(System.out, VerboseMode.EXTRA),
+                Collections.singletonList(klass.getName().replaceAll("\\$", ".")),
+                Collections.<String>emptyList());
         Assert.assertEquals("The single benchmark exists", 1, set.size());
         return set.iterator().next();
     }
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/params/EnumBenchParamImplicitSequenceTest.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/params/EnumBenchParamImplicitSequenceTest.java	Wed Nov 16 21:10:51 2016 +0100
@@ -90,11 +90,11 @@
         Assert.assertEquals(1*3, new Runner(opts).run().size());
     }
 
-    public static enum SampleEnumA {
-        VALUE_A, VALUE_B, VALUE_C;
+    public enum SampleEnumA {
+        VALUE_A, VALUE_B, VALUE_C
     }
 
-    public static enum SampleEnumB {
-        VALUE_A, VALUE_B, VALUE_C;
+    public enum SampleEnumB {
+        VALUE_A, VALUE_B, VALUE_C
     }
 }
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/params/EnumParamSequenceTest.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/params/EnumParamSequenceTest.java	Wed Nov 16 21:10:51 2016 +0100
@@ -90,11 +90,11 @@
         Assert.assertEquals(1*3, new Runner(opts).run().size());
     }
 
-    public static enum SampleEnumA {
-        VALUE_A, VALUE_B, VALUE_C;
+    public enum SampleEnumA {
+        VALUE_A, VALUE_B, VALUE_C
     }
 
-    public static enum SampleEnumB {
-        VALUE_A, VALUE_B, VALUE_C;
+    public enum SampleEnumB {
+        VALUE_A, VALUE_B, VALUE_C
     }
 }
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/params/EnumStateParamImplicitSequenceTest.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/params/EnumStateParamImplicitSequenceTest.java	Wed Nov 16 21:10:51 2016 +0100
@@ -92,11 +92,11 @@
         Assert.assertEquals(1*3, new Runner(opts).run().size());
     }
 
-    public static enum SampleEnumA {
-        VALUE_A, VALUE_B, VALUE_C;
+    public enum SampleEnumA {
+        VALUE_A, VALUE_B, VALUE_C
     }
 
-    public static enum SampleEnumB {
-        VALUE_A, VALUE_B, VALUE_C;
+    public enum SampleEnumB {
+        VALUE_A, VALUE_B, VALUE_C
     }
 }
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/params/nested/NestedSubclassDependencyTest.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/params/nested/NestedSubclassDependencyTest.java	Wed Nov 16 21:10:51 2016 +0100
@@ -30,7 +30,6 @@
 import org.openjdk.jmh.annotations.Measurement;
 import org.openjdk.jmh.annotations.Param;
 import org.openjdk.jmh.annotations.Scope;
-import org.openjdk.jmh.annotations.Setup;
 import org.openjdk.jmh.annotations.State;
 import org.openjdk.jmh.annotations.Warmup;
 import org.openjdk.jmh.it.Fixtures;
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/params/nested/NestedTearDownDependencyTest.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/params/nested/NestedTearDownDependencyTest.java	Wed Nov 16 21:10:51 2016 +0100
@@ -30,7 +30,6 @@
 import org.openjdk.jmh.annotations.Measurement;
 import org.openjdk.jmh.annotations.Param;
 import org.openjdk.jmh.annotations.Scope;
-import org.openjdk.jmh.annotations.Setup;
 import org.openjdk.jmh.annotations.State;
 import org.openjdk.jmh.annotations.TearDown;
 import org.openjdk.jmh.annotations.Warmup;
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/sharing/BenchmarkBenchSharingTest.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/sharing/BenchmarkBenchSharingTest.java	Wed Nov 16 21:10:51 2016 +0100
@@ -51,7 +51,7 @@
 @State(Scope.Benchmark)
 public class BenchmarkBenchSharingTest {
 
-    Set<Thread> visitors = Collections.synchronizedSet(new HashSet<Thread>());
+    final Set<Thread> visitors = Collections.synchronizedSet(new HashSet<Thread>());
 
     @TearDown(Level.Trial)
     public void tearDown() {
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/sharing/BenchmarkStateSharingTest.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/sharing/BenchmarkStateSharingTest.java	Wed Nov 16 21:10:51 2016 +0100
@@ -52,7 +52,7 @@
 
     @State(Scope.Benchmark)
     public static class MyState {
-        Set<Thread> visitors = Collections.synchronizedSet(new HashSet<Thread>());
+        final Set<Thread> visitors = Collections.synchronizedSet(new HashSet<Thread>());
 
         @TearDown(Level.Trial)
         public void tearDown() {
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/sharing/GroupBenchSharingTest.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/sharing/GroupBenchSharingTest.java	Wed Nov 16 21:10:51 2016 +0100
@@ -52,7 +52,7 @@
 @State(Scope.Group)
 public class GroupBenchSharingTest {
 
-    Set<Thread> visitors = Collections.synchronizedSet(new HashSet<Thread>());
+    final Set<Thread> visitors = Collections.synchronizedSet(new HashSet<Thread>());
 
     @TearDown(Level.Trial)
     public void tearDown() {
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/sharing/GroupDefaultBenchSharingTest.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/sharing/GroupDefaultBenchSharingTest.java	Wed Nov 16 21:10:51 2016 +0100
@@ -52,7 +52,7 @@
 @State(Scope.Group)
 public class GroupDefaultBenchSharingTest {
 
-    Set<Thread> visitors = Collections.synchronizedSet(new HashSet<Thread>());
+    final Set<Thread> visitors = Collections.synchronizedSet(new HashSet<Thread>());
 
     @TearDown(Level.Trial)
     public void tearDown() {
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/sharing/GroupDefaultStateSharingTest.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/sharing/GroupDefaultStateSharingTest.java	Wed Nov 16 21:10:51 2016 +0100
@@ -53,7 +53,7 @@
 
     @State(Scope.Group)
     public static class MyState {
-        Set<Thread> visitors = Collections.synchronizedSet(new HashSet<Thread>());
+        final Set<Thread> visitors = Collections.synchronizedSet(new HashSet<Thread>());
 
         @TearDown(Level.Trial)
         public void tearDown() {
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/sharing/GroupStateSharingTest.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/sharing/GroupStateSharingTest.java	Wed Nov 16 21:10:51 2016 +0100
@@ -53,7 +53,7 @@
 
     @State(Scope.Group)
     public static class MyState {
-        Set<Thread> visitors = Collections.synchronizedSet(new HashSet<Thread>());
+        final Set<Thread> visitors = Collections.synchronizedSet(new HashSet<Thread>());
 
         @TearDown(Level.Trial)
         public void tearDown() {
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/sharing/ThreadBenchSharingTest.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/sharing/ThreadBenchSharingTest.java	Wed Nov 16 21:10:51 2016 +0100
@@ -51,7 +51,7 @@
 @State(Scope.Thread)
 public class ThreadBenchSharingTest {
 
-    Set<Thread> visitors = Collections.synchronizedSet(new HashSet<Thread>());
+    final Set<Thread> visitors = Collections.synchronizedSet(new HashSet<Thread>());
 
     @TearDown(Level.Trial)
     public void tearDown() {
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/sharing/ThreadStateSharingTest.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/sharing/ThreadStateSharingTest.java	Wed Nov 16 21:10:51 2016 +0100
@@ -52,7 +52,7 @@
 
     @State(Scope.Thread)
     public static class MyState {
-        Set<Thread> visitors = Collections.synchronizedSet(new HashSet<Thread>());
+        final Set<Thread> visitors = Collections.synchronizedSet(new HashSet<Thread>());
 
         @TearDown(Level.Trial)
         public void tearDown() {
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/threads/BenchmarkBenchSameThreadTest.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/threads/BenchmarkBenchSameThreadTest.java	Wed Nov 16 21:10:51 2016 +0100
@@ -55,13 +55,13 @@
 @State(Scope.Benchmark)
 public class BenchmarkBenchSameThreadTest {
 
-    private Set<Thread> setupRunThread = Collections.synchronizedSet(new HashSet<Thread>());
-    private Set<Thread> setupIterationThread = Collections.synchronizedSet(new HashSet<Thread>());
-    private Set<Thread> setupInvocationThread = Collections.synchronizedSet(new HashSet<Thread>());
-    private Set<Thread> teardownRunThread = Collections.synchronizedSet(new HashSet<Thread>());
-    private Set<Thread> teardownIterationThread = Collections.synchronizedSet(new HashSet<Thread>());
-    private Set<Thread> teardownInvocationThread = Collections.synchronizedSet(new HashSet<Thread>());
-    private Set<Thread> testInvocationThread = Collections.synchronizedSet(new HashSet<Thread>());
+    private final Set<Thread> setupRunThread = Collections.synchronizedSet(new HashSet<Thread>());
+    private final Set<Thread> setupIterationThread = Collections.synchronizedSet(new HashSet<Thread>());
+    private final Set<Thread> setupInvocationThread = Collections.synchronizedSet(new HashSet<Thread>());
+    private final Set<Thread> teardownRunThread = Collections.synchronizedSet(new HashSet<Thread>());
+    private final Set<Thread> teardownIterationThread = Collections.synchronizedSet(new HashSet<Thread>());
+    private final Set<Thread> teardownInvocationThread = Collections.synchronizedSet(new HashSet<Thread>());
+    private final Set<Thread> testInvocationThread = Collections.synchronizedSet(new HashSet<Thread>());
 
     @Setup(Level.Trial)
     public void setupRun() {
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/threads/BenchmarkStateSameThreadTest.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/threads/BenchmarkStateSameThreadTest.java	Wed Nov 16 21:10:51 2016 +0100
@@ -57,13 +57,13 @@
     @State(Scope.Benchmark)
     public static class MyState {
 
-        private Set<Thread> setupRunThread = Collections.synchronizedSet(new HashSet<Thread>());
-        private Set<Thread> setupIterationThread = Collections.synchronizedSet(new HashSet<Thread>());
-        private Set<Thread> setupInvocationThread = Collections.synchronizedSet(new HashSet<Thread>());
-        private Set<Thread> teardownRunThread = Collections.synchronizedSet(new HashSet<Thread>());
-        private Set<Thread> teardownIterationThread = Collections.synchronizedSet(new HashSet<Thread>());
-        private Set<Thread> teardownInvocationThread = Collections.synchronizedSet(new HashSet<Thread>());
-        private Set<Thread> testInvocationThread = Collections.synchronizedSet(new HashSet<Thread>());
+        private final Set<Thread> setupRunThread = Collections.synchronizedSet(new HashSet<Thread>());
+        private final Set<Thread> setupIterationThread = Collections.synchronizedSet(new HashSet<Thread>());
+        private final Set<Thread> setupInvocationThread = Collections.synchronizedSet(new HashSet<Thread>());
+        private final Set<Thread> teardownRunThread = Collections.synchronizedSet(new HashSet<Thread>());
+        private final Set<Thread> teardownIterationThread = Collections.synchronizedSet(new HashSet<Thread>());
+        private final Set<Thread> teardownInvocationThread = Collections.synchronizedSet(new HashSet<Thread>());
+        private final Set<Thread> testInvocationThread = Collections.synchronizedSet(new HashSet<Thread>());
 
         @Setup(Level.Trial)
         public void setupRun() {
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/threads/GroupBenchSameThreadTest.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/threads/GroupBenchSameThreadTest.java	Wed Nov 16 21:10:51 2016 +0100
@@ -56,13 +56,13 @@
 @State(Scope.Group)
 public class GroupBenchSameThreadTest {
 
-    private Set<Thread> setupRunThread = Collections.synchronizedSet(new HashSet<Thread>());
-    private Set<Thread> setupIterationThread = Collections.synchronizedSet(new HashSet<Thread>());
-    private Set<Thread> setupInvocationThread = Collections.synchronizedSet(new HashSet<Thread>());
-    private Set<Thread> teardownRunThread = Collections.synchronizedSet(new HashSet<Thread>());
-    private Set<Thread> teardownIterationThread = Collections.synchronizedSet(new HashSet<Thread>());
-    private Set<Thread> teardownInvocationThread = Collections.synchronizedSet(new HashSet<Thread>());
-    private Set<Thread> testInvocationThread = Collections.synchronizedSet(new HashSet<Thread>());
+    private final Set<Thread> setupRunThread = Collections.synchronizedSet(new HashSet<Thread>());
+    private final Set<Thread> setupIterationThread = Collections.synchronizedSet(new HashSet<Thread>());
+    private final Set<Thread> setupInvocationThread = Collections.synchronizedSet(new HashSet<Thread>());
+    private final Set<Thread> teardownRunThread = Collections.synchronizedSet(new HashSet<Thread>());
+    private final Set<Thread> teardownIterationThread = Collections.synchronizedSet(new HashSet<Thread>());
+    private final Set<Thread> teardownInvocationThread = Collections.synchronizedSet(new HashSet<Thread>());
+    private final Set<Thread> testInvocationThread = Collections.synchronizedSet(new HashSet<Thread>());
 
     @Setup(Level.Trial)
     public void setupRun() {
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/threads/GroupStateSameThreadTest.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/threads/GroupStateSameThreadTest.java	Wed Nov 16 21:10:51 2016 +0100
@@ -58,13 +58,13 @@
     @State(Scope.Group)
     public static class MyState {
 
-        private Set<Thread> setupRunThread = Collections.synchronizedSet(new HashSet<Thread>());
-        private Set<Thread> setupIterationThread = Collections.synchronizedSet(new HashSet<Thread>());
-        private Set<Thread> setupInvocationThread = Collections.synchronizedSet(new HashSet<Thread>());
-        private Set<Thread> teardownRunThread = Collections.synchronizedSet(new HashSet<Thread>());
-        private Set<Thread> teardownIterationThread = Collections.synchronizedSet(new HashSet<Thread>());
-        private Set<Thread> teardownInvocationThread = Collections.synchronizedSet(new HashSet<Thread>());
-        private Set<Thread> testInvocationThread = Collections.synchronizedSet(new HashSet<Thread>());
+        private final Set<Thread> setupRunThread = Collections.synchronizedSet(new HashSet<Thread>());
+        private final Set<Thread> setupIterationThread = Collections.synchronizedSet(new HashSet<Thread>());
+        private final Set<Thread> setupInvocationThread = Collections.synchronizedSet(new HashSet<Thread>());
+        private final Set<Thread> teardownRunThread = Collections.synchronizedSet(new HashSet<Thread>());
+        private final Set<Thread> teardownIterationThread = Collections.synchronizedSet(new HashSet<Thread>());
+        private final Set<Thread> teardownInvocationThread = Collections.synchronizedSet(new HashSet<Thread>());
+        private final Set<Thread> testInvocationThread = Collections.synchronizedSet(new HashSet<Thread>());
 
         @Setup(Level.Trial)
         public void setupRun() {
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/threads/GroupThreadGroupOrderTest.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/threads/GroupThreadGroupOrderTest.java	Wed Nov 16 21:10:51 2016 +0100
@@ -48,9 +48,9 @@
 @State(Scope.Group)
 public class GroupThreadGroupOrderTest {
 
-    private Set<Thread> abc = Collections.synchronizedSet(new HashSet<Thread>());
-    private Set<Thread> def = Collections.synchronizedSet(new HashSet<Thread>());
-    private Set<Thread> ghi = Collections.synchronizedSet(new HashSet<Thread>());
+    private final Set<Thread> abc = Collections.synchronizedSet(new HashSet<Thread>());
+    private final Set<Thread> def = Collections.synchronizedSet(new HashSet<Thread>());
+    private final Set<Thread> ghi = Collections.synchronizedSet(new HashSet<Thread>());
 
     @Setup(Level.Iteration)
     public void prepare() {
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/threads/MaxThreadCountTest.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/threads/MaxThreadCountTest.java	Wed Nov 16 21:10:51 2016 +0100
@@ -52,7 +52,7 @@
 @State(Scope.Benchmark)
 public class MaxThreadCountTest {
 
-    private Set<Thread> threads = Collections.synchronizedSet(new HashSet<Thread>());
+    private final Set<Thread> threads = Collections.synchronizedSet(new HashSet<Thread>());
 
     @TearDown(Level.Iteration)
     public void tearDown() {
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/threads/OneThreadCountTest.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/threads/OneThreadCountTest.java	Wed Nov 16 21:10:51 2016 +0100
@@ -52,7 +52,7 @@
 @State(Scope.Benchmark)
 public class OneThreadCountTest {
 
-    private Set<Thread> threads = Collections.synchronizedSet(new HashSet<Thread>());
+    private final Set<Thread> threads = Collections.synchronizedSet(new HashSet<Thread>());
 
     @TearDown(Level.Iteration)
     public void tearDown() {
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/threads/TwoThreadCountTest.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/threads/TwoThreadCountTest.java	Wed Nov 16 21:10:51 2016 +0100
@@ -52,7 +52,7 @@
 @State(Scope.Benchmark)
 public class TwoThreadCountTest {
 
-    private Set<Thread> threads = Collections.synchronizedSet(new HashSet<Thread>());
+    private final Set<Thread> threads = Collections.synchronizedSet(new HashSet<Thread>());
 
     @TearDown(Level.Iteration)
     public void tearDown() {
--- a/jmh-core/src/main/java/org/openjdk/jmh/annotations/CompilerControl.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/annotations/CompilerControl.java	Wed Nov 16 21:10:51 2016 +0100
@@ -58,7 +58,7 @@
     /**
      * Compilation mode.
      */
-    public enum Mode {
+    enum Mode {
 
         /**
          * Insert the breakpoint into the generated compiled code.
--- a/jmh-core/src/main/java/org/openjdk/jmh/annotations/Fork.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/annotations/Fork.java	Wed Nov 16 21:10:51 2016 +0100
@@ -43,9 +43,9 @@
 @Retention(RetentionPolicy.RUNTIME)
 public @interface Fork {
 
-    static final int BLANK_FORKS = -1;
+    int BLANK_FORKS = -1;
 
-    static final String BLANK_ARGS = "blank_blank_blank_2014";
+    String BLANK_ARGS = "blank_blank_blank_2014";
 
     /** @return number of times harness should fork, zero means "no fork" */
     int value() default BLANK_FORKS;
--- a/jmh-core/src/main/java/org/openjdk/jmh/annotations/Measurement.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/annotations/Measurement.java	Wed Nov 16 21:10:51 2016 +0100
@@ -47,9 +47,9 @@
 @Retention(RetentionPolicy.RUNTIME)
 public @interface Measurement {
 
-    static final int BLANK_ITERATIONS = -1;
-    static final int BLANK_TIME = -1;
-    static final int BLANK_BATCHSIZE = -1;
+    int BLANK_ITERATIONS = -1;
+    int BLANK_TIME = -1;
+    int BLANK_BATCHSIZE = -1;
 
     /** @return Number of measurement iterations */
     int iterations() default BLANK_ITERATIONS;
--- a/jmh-core/src/main/java/org/openjdk/jmh/annotations/Param.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/annotations/Param.java	Wed Nov 16 21:10:51 2016 +0100
@@ -56,7 +56,7 @@
 @Retention(RetentionPolicy.RUNTIME)
 public @interface Param {
 
-    static final String BLANK_ARGS = "blank_blank_blank_2014";
+    String BLANK_ARGS = "blank_blank_blank_2014";
 
     /**
      * Default values sequence for the parameter. By default, the parameter
--- a/jmh-core/src/main/java/org/openjdk/jmh/annotations/Threads.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/annotations/Threads.java	Wed Nov 16 21:10:51 2016 +0100
@@ -47,7 +47,7 @@
      * The magic value for MAX threads.
      * This means Runtime.getRuntime().availableProcessors() threads.
      */
-    public static int MAX = -1;
+    int MAX = -1;
 
     /**
      * @return Number of threads; use Threads.MAX to run with all available threads.
--- a/jmh-core/src/main/java/org/openjdk/jmh/annotations/Warmup.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/annotations/Warmup.java	Wed Nov 16 21:10:51 2016 +0100
@@ -45,9 +45,9 @@
 @Inherited
 public @interface Warmup {
 
-    static final int BLANK_ITERATIONS = -1;
-    static final int BLANK_TIME = -1;
-    static final int BLANK_BATCHSIZE = -1;
+    int BLANK_ITERATIONS = -1;
+    int BLANK_TIME = -1;
+    int BLANK_BATCHSIZE = -1;
 
     /** @return Number of warmup iterations */
     int iterations() default BLANK_ITERATIONS;
--- a/jmh-core/src/main/java/org/openjdk/jmh/infra/BenchmarkParams.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/infra/BenchmarkParams.java	Wed Nov 16 21:10:51 2016 +0100
@@ -25,8 +25,6 @@
 package org.openjdk.jmh.infra;
 
 import org.openjdk.jmh.annotations.Mode;
-import org.openjdk.jmh.annotations.Scope;
-import org.openjdk.jmh.annotations.State;
 import org.openjdk.jmh.runner.WorkloadParams;
 import org.openjdk.jmh.runner.options.TimeValue;
 import org.openjdk.jmh.util.Utils;
--- a/jmh-core/src/main/java/org/openjdk/jmh/profile/LinuxPerfProfiler.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/profile/LinuxPerfProfiler.java	Wed Nov 16 21:10:51 2016 +0100
@@ -30,7 +30,6 @@
 import joptsimple.OptionSpec;
 import org.openjdk.jmh.infra.BenchmarkParams;
 import org.openjdk.jmh.results.*;
-import org.openjdk.jmh.util.FileUtils;
 import org.openjdk.jmh.util.ScoreFormatter;
 import org.openjdk.jmh.util.Utils;
 
--- a/jmh-core/src/main/java/org/openjdk/jmh/profile/PausesProfiler.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/profile/PausesProfiler.java	Wed Nov 16 21:10:51 2016 +0100
@@ -150,7 +150,7 @@
     }
 
     static class PausesProfilerResult extends Result<PausesProfilerResult> {
-        private SampleBuffer buffer;
+        private final SampleBuffer buffer;
 
         public PausesProfilerResult(SampleBuffer buffer) {
             super(ResultRole.SECONDARY, Defaults.PREFIX + "pauses", buffer.getStatistics(1D / 1000000), "ms", AggregationPolicy.SUM);
--- a/jmh-core/src/main/java/org/openjdk/jmh/profile/ProfilerFactory.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/profile/ProfilerFactory.java	Wed Nov 16 21:10:51 2016 +0100
@@ -79,14 +79,19 @@
     }
 
     private static Profiler instantiate(ProfilerConfig cfg, Class<? extends Profiler> p) throws InstantiationException, IllegalAccessException, InvocationTargetException {
-        Profiler prof;
         try {
-            Constructor<? extends Profiler> constructor = p.getConstructor(String.class);
-            prof = constructor.newInstance(cfg.getOpts());
+            return p.getConstructor(String.class).newInstance(cfg.getOpts());
         } catch (NoSuchMethodException e) {
-            prof = p.newInstance();
+            // fallthrough
         }
-        return prof;
+
+        try {
+            return p.getConstructor().newInstance();
+        } catch (NoSuchMethodException e) {
+            // fallthrough
+        }
+
+        throw new IllegalStateException("Cannot instantiate profiler");
     }
 
     public static List<ExternalProfiler> getSupportedExternal(Collection<ProfilerConfig> cfg) {
@@ -127,14 +132,7 @@
         for (String s : BUILT_IN.keySet()) {
             try {
                 Profiler prof = getProfilerOrException(new ProfilerConfig(s, ""));
-                String descr = (prof != null) ? prof.getDescription() : "(unable to instantiate the profiler)";
-
-                if (prof != null) {
-                    supported.append(String.format("%" + maxLen + "s: %s %s\n", s, descr, ""));
-                } else {
-                    unsupported.append(String.format("%" + maxLen + "s: %s %s\n", s, descr, ""));
-                    unsupported.append("\n");
-                }
+                supported.append(String.format("%" + maxLen + "s: %s %s\n", s, prof.getDescription(), ""));
             } catch (ProfilerException e) {
                 unsupported.append(String.format("%" + maxLen + "s: %s %s\n", s, "<none>", ""));
                 unsupported.append(e.getMessage());
@@ -145,14 +143,7 @@
         for (Class<? extends Profiler> s : ProfilerFactory.getDiscoveredProfilers()) {
             try {
                 Profiler prof = getProfilerOrException(new ProfilerConfig(s.getCanonicalName(), ""));
-                String descr = (prof != null) ? prof.getDescription() : "(unable to instantiate the profiler)";
-
-                if (prof != null) {
-                    supported.append(String.format("%" + maxLen + "s: %s %s\n", s.getCanonicalName(), descr, "(discovered)"));
-                } else {
-                    unsupported.append(String.format("%" + maxLen + "s: %s %s\n", s.getCanonicalName(), descr, "(discovered)"));
-                    unsupported.append("\n");
-                }
+                supported.append(String.format("%" + maxLen + "s: %s %s\n", s.getCanonicalName(), prof.getDescription(), "(discovered)"));
             } catch (ProfilerException e) {
                 unsupported.append(String.format("%" + maxLen + "s: %s %s\n", s, s.getCanonicalName(), ""));
                 unsupported.append(e.getMessage());
--- a/jmh-core/src/main/java/org/openjdk/jmh/profile/ProfilerOptionFormatter.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/profile/ProfilerOptionFormatter.java	Wed Nov 16 21:10:51 2016 +0100
@@ -46,7 +46,7 @@
         sb.append("Usage: -prof <profiler-name>:opt1=value1,value2;opt2=value3");
         sb.append(LINE_SEPARATOR);
         sb.append(LINE_SEPARATOR);
-        sb.append("Options accepted by " + name + ":");
+        sb.append("Options accepted by ").append(name).append(":");
         for (OptionDescriptor each : options.values()) {
             sb.append(lineFor(each));
         }
--- a/jmh-core/src/main/java/org/openjdk/jmh/results/AggregationPolicy.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/results/AggregationPolicy.java	Wed Nov 16 21:10:51 2016 +0100
@@ -36,7 +36,7 @@
 
     ;
 
-    private String label;
+    private final String label;
 
     AggregationPolicy(String label) {
         this.label = label;
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/BenchmarkHandler.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/BenchmarkHandler.java	Wed Nov 16 21:10:51 2016 +0100
@@ -37,7 +37,7 @@
 import org.openjdk.jmh.util.ClassUtils;
 import org.openjdk.jmh.util.Utils;
 
-import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.util.*;
 import java.util.concurrent.*;
@@ -79,13 +79,13 @@
             @Override
             protected ThreadData initialValue() {
                 try {
-                    Object o = clazz.newInstance();
+                    Object o = clazz.getConstructor().newInstance();
                     ThreadParams t = tps.poll();
                     if (t == null) {
                         throw new IllegalStateException("Cannot get another thread params");
                     }
                     return new ThreadData(o, t);
-                } catch (InstantiationException | IllegalAccessException e) {
+                } catch (InstantiationException | IllegalAccessException | NoSuchMethodException | InvocationTargetException e) {
                     throw new RuntimeException("Class " + clazz.getName() + " instantiation error ", e);
                 }
             }
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/BenchmarkList.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/BenchmarkList.java	Wed Nov 16 21:10:51 2016 +0100
@@ -68,7 +68,7 @@
      * @return A list of all benchmarks, excluding matched
      */
     public Set<BenchmarkListEntry> getAll(OutputFormat out, List<String> excludes) {
-        return find(out, Arrays.asList(".*"), excludes);
+        return find(out, Collections.singletonList(".*"), excludes);
     }
 
     /**
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/WorkloadParams.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/WorkloadParams.java	Wed Nov 16 21:10:51 2016 +0100
@@ -113,8 +113,8 @@
     private static class Value implements Comparable<Value>, Serializable {
         private static final long serialVersionUID = 8846779314306880977L;
 
-        private String value;
-        private int order;
+        private final String value;
+        private final int order;
 
         public Value(String value, int order) {
             this.value = value;
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/format/OutputFormat.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/format/OutputFormat.java	Wed Nov 16 21:10:51 2016 +0100
@@ -45,7 +45,7 @@
      * @param params iteration params in use
      * @param iteration iteration-number
      */
-    public void iteration(BenchmarkParams benchParams, IterationParams params, int iteration);
+    void iteration(BenchmarkParams benchParams, IterationParams params, int iteration);
 
     /**
      * Format for end-of-iteration.
@@ -55,31 +55,31 @@
      * @param iteration iteration-number
      * @param data    result of iteration
      */
-    public void iterationResult(BenchmarkParams benchParams, IterationParams params, int iteration, IterationResult data);
+    void iterationResult(BenchmarkParams benchParams, IterationParams params, int iteration, IterationResult data);
 
     /**
      * Format for start-of-benchmark output.
      * @param benchParams benchmark params
      */
-    public void startBenchmark(BenchmarkParams benchParams);
+    void startBenchmark(BenchmarkParams benchParams);
 
     /**
      * Format for end-of-benchmark.
      *
      * @param result statistics of the run
      */
-    public void endBenchmark(BenchmarkResult result);
+    void endBenchmark(BenchmarkResult result);
 
     /**
      * Format for start-of-benchmark output.
      */
-    public void startRun();
+    void startRun();
 
     /**
      * Format for end-of-benchmark.
      * @param result benchmark results
      */
-    public void endRun(Collection<RunResult> result);
+    void endRun(Collection<RunResult> result);
 
     /* ------------- RAW OUTPUT METHODS ------------------- */
 
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/link/OutputFrame.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/link/OutputFrame.java	Wed Nov 16 21:10:51 2016 +0100
@@ -45,7 +45,7 @@
         return type;
     }
 
-    public static enum Type {
+    public enum Type {
         OUT,
         ERR,
     }
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/options/OptionsBuilder.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/options/OptionsBuilder.java	Wed Nov 16 21:10:51 2016 +0100
@@ -192,7 +192,7 @@
 
     // ---------------------------------------------------------------------------
 
-    private List<ProfilerConfig> profilers = new ArrayList<>();
+    private final List<ProfilerConfig> profilers = new ArrayList<>();
 
     @Override
     public ChainedOptionsBuilder addProfiler(Class<? extends Profiler> prof) {
@@ -490,7 +490,7 @@
 
     // ---------------------------------------------------------------------------
 
-    private EnumSet<Mode> benchModes = EnumSet.noneOf(Mode.class);
+    private final EnumSet<Mode> benchModes = EnumSet.noneOf(Mode.class);
 
     @Override
     public ChainedOptionsBuilder mode(Mode mode) {
@@ -672,7 +672,7 @@
 
     // ---------------------------------------------------------------------------
 
-    private Multimap<String, String> params = new HashMultimap<>();
+    private final Multimap<String, String> params = new HashMultimap<>();
 
     @Override
     public Optional<Collection<String>> getParameter(String name) {
--- a/jmh-core/src/main/java/org/openjdk/jmh/util/Utils.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/util/Utils.java	Wed Nov 16 21:10:51 2016 +0100
@@ -29,10 +29,8 @@
 import java.io.*;
 import java.lang.management.ManagementFactory;
 import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.nio.charset.Charset;
-import java.nio.charset.UnsupportedCharsetException;
 import java.util.*;
 import java.util.concurrent.*;
 import java.util.regex.Pattern;
--- a/jmh-core/src/main/java/org/openjdk/jmh/util/lines/TestLineWriter.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/util/lines/TestLineWriter.java	Wed Nov 16 21:10:51 2016 +0100
@@ -35,7 +35,7 @@
 
 public class TestLineWriter {
 
-    private StringBuilder line;
+    private final StringBuilder line;
 
     public TestLineWriter() {
         line = new StringBuilder();
--- a/jmh-core/src/test/java/org/openjdk/jmh/runner/RunnerTest.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core/src/test/java/org/openjdk/jmh/runner/RunnerTest.java	Wed Nov 16 21:10:51 2016 +0100
@@ -86,7 +86,7 @@
     public void testOptsWithCompileCommandFileResultInMergedCompileCommandFile() throws IOException {
         // add a hints file
         String tempHints = FileUtils.createTempFileWithLines("fileWithLines",
-                Arrays.asList("inline,we/like/to/move/it.*"));
+                Collections.singletonList("inline,we/like/to/move/it.*"));
         Set<String> extraHints = CompilerHints.fromFile(tempHints).get();
         Runner blade = new Runner(new OptionsBuilder().build());
         BenchmarkParams bp = new BenchmarkParams("Foo", "bar", false,
@@ -95,7 +95,7 @@
                 new IterationParams(IterationType.WARMUP,      1, TimeValue.seconds(1), 1),
                 new IterationParams(IterationType.MEASUREMENT, 1, TimeValue.seconds(1), 1),
                 Mode.Throughput, null, TimeUnit.SECONDS, 1,
-                Utils.getCurrentJvm(), Arrays.asList(CompilerHints.XX_COMPILE_COMMAND_FILE + tempHints),
+                Utils.getCurrentJvm(), Collections.singletonList(CompilerHints.XX_COMPILE_COMMAND_FILE + tempHints),
                 TimeValue.days(1));
         List<String> command = blade.getForkedMainCommand(bp, Collections.<ExternalProfiler>emptyList(), DUMMY_HOST, DUMMY_PORT);
 
@@ -118,10 +118,10 @@
     public void testOptsWith2CompileCommandFilesResultInMergedCompileCommandFile() throws IOException {
         // add hints files
         String tempHints1 = FileUtils.createTempFileWithLines("fileWithLines",
-                Arrays.asList("inline,we/like/to/move/it/move/it.*"));
+                Collections.singletonList("inline,we/like/to/move/it/move/it.*"));
         Set<String> extraHints1 = CompilerHints.fromFile(tempHints1).get();
         String tempHints2 = FileUtils.createTempFileWithLines("fileWithLines",
-                Arrays.asList("inline,we/like/to/move/it.*"));
+                Collections.singletonList("inline,we/like/to/move/it.*"));
         Set<String> extraHints2 = CompilerHints.fromFile(tempHints2).get();
         Runner blade = new Runner(new OptionsBuilder().build());
         BenchmarkParams bp = new BenchmarkParams("Foo", "bar", false,
--- a/jmh-core/src/test/java/org/openjdk/jmh/runner/TestBenchmarkList.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core/src/test/java/org/openjdk/jmh/runner/TestBenchmarkList.java	Wed Nov 16 21:10:51 2016 +0100
@@ -209,7 +209,7 @@
     @Test
     public void testListGetNothing() throws Exception {
         // make sure we get nothing
-        List<String> excludes = Arrays.asList(".*");
+        List<String> excludes = Collections.singletonList(".*");
         Set<BenchmarkListEntry> micros = list.getAll(out, excludes);
         assertEquals(0, micros.size());
     }
@@ -225,7 +225,7 @@
     @Test
     public void testListFindSingleByPattern() throws Exception {
         // check find without excludes
-        List<String> includes = Arrays.asList(".*Hash.*");
+        List<String> includes = Collections.singletonList(".*Hash.*");
         List<String> excludes = Collections.emptyList();
         Set<BenchmarkListEntry> micros = list.find(out, includes, excludes);
         assertEquals(7, micros.size());
@@ -234,7 +234,7 @@
     @Test
     public void testListFindSingleBySubstring() throws Exception {
         // check find without excludes
-        List<String> includes = Arrays.asList("Hash");
+        List<String> includes = Collections.singletonList("Hash");
         List<String> excludes = Collections.emptyList();
         Set<BenchmarkListEntry> micros = list.find(out, includes, excludes);
         assertEquals(7, micros.size());
@@ -244,7 +244,7 @@
     public void testListFindSingleByTypical() throws Exception {
         // check find without excludes
         // this would be a typical partial pattern with . abuse case
-        List<String> includes = Arrays.asList("jbb05.GeneratedSPECjbb2005HashMap");
+        List<String> includes = Collections.singletonList("jbb05.GeneratedSPECjbb2005HashMap");
         List<String> excludes = Collections.emptyList();
         Set<BenchmarkListEntry> micros = list.find(out, includes, excludes);
         assertEquals(5, micros.size());
@@ -254,7 +254,7 @@
     public void testListFindAnchored() throws Exception {
         // check find without excludes
         // matches only: org.openjdk.jmh.runner.TestMicro.dummy
-        List<String> includes = Arrays.asList("^org\\.openjdk.*\\.dummy$");
+        List<String> includes = Collections.singletonList("^org\\.openjdk.*\\.dummy$");
         List<String> excludes = Collections.emptyList();
         Set<BenchmarkListEntry> micros = list.find(out, includes, excludes);
         assertEquals(1, micros.size());
@@ -263,8 +263,8 @@
     @Test
     public void testListFindSingleWithExcludes() throws Exception {
         // check find with excludes
-        List<String> includes = Arrays.asList(".*Hash.*");
-        List<String> excludes = Arrays.asList(".*Int.*");
+        List<String> includes = Collections.singletonList(".*Hash.*");
+        List<String> excludes = Collections.singletonList(".*Int.*");
         Set<BenchmarkListEntry> micros = list.find(out, includes, excludes);
         assertEquals(2, micros.size());
     }
@@ -272,8 +272,8 @@
     @Test
     public void testListFindAllWithSubstringExclude() throws Exception {
         // check find with excludes
-        List<String> includes = Arrays.asList("");
-        List<String> excludes = Arrays.asList("oracle");
+        List<String> includes = Collections.singletonList("");
+        List<String> excludes = Collections.singletonList("oracle");
         Set<BenchmarkListEntry> micros = list.find(out, includes, excludes);
         assertEquals(10, micros.size());
     }
@@ -297,8 +297,8 @@
 
     @Test
     public void testListFindWithIncludesAndExcludes() throws Exception {
-        List<String> includes = Arrays.asList(".*Concurrent.*");
-        List<String> excludes = Arrays.asList(".*Int.*");
+        List<String> includes = Collections.singletonList(".*Concurrent.*");
+        List<String> excludes = Collections.singletonList(".*Int.*");
         Set<BenchmarkListEntry> micros = list.find(out, includes, excludes);
         assertEquals(2, micros.size());
     }
@@ -306,8 +306,8 @@
     @Test
     public void testListIsSorted() throws Exception {
         // micros should be sorted
-        List<String> includes = Arrays.asList(".*Hash.*");
-        List<String> excludes = Arrays.asList(".*Int.*");
+        List<String> includes = Collections.singletonList(".*Hash.*");
+        List<String> excludes = Collections.singletonList(".*Int.*");
         Set<BenchmarkListEntry> micros = list.find(out, includes, excludes);
         BenchmarkListEntry first = micros.iterator().next();
         assertTrue("oracle.micro.benchmarks.api.java.util.concurrent.GeneratedMaps.testConcurrentHashMap".equals(first.getUsername()));
--- a/jmh-core/src/test/java/org/openjdk/jmh/runner/options/TestParentOptions.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core/src/test/java/org/openjdk/jmh/runner/options/TestParentOptions.java	Wed Nov 16 21:10:51 2016 +0100
@@ -31,6 +31,7 @@
 
 import java.util.Arrays;
 import java.util.Collection;
+import java.util.Collections;
 import java.util.EnumSet;
 import java.util.concurrent.TimeUnit;
 
@@ -47,7 +48,7 @@
     public void testIncludes_Parent() throws Exception {
         Options parent = new OptionsBuilder().include(".*").build();
         Options builder = new OptionsBuilder().parent(parent).build();
-        Assert.assertEquals(Arrays.asList(".*"), builder.getIncludes());
+        Assert.assertEquals(Collections.singletonList(".*"), builder.getIncludes());
     }
 
     @Test
@@ -68,7 +69,7 @@
     public void testExcludes_Parent() throws Exception {
         Options parent = new OptionsBuilder().include(".*").build();
         Options builder = new OptionsBuilder().parent(parent).build();
-        Assert.assertEquals(Arrays.asList(".*"), builder.getIncludes());
+        Assert.assertEquals(Collections.singletonList(".*"), builder.getIncludes());
     }
 
     @Test
@@ -575,7 +576,7 @@
     public void testWarmupMicros_Parent() throws Exception {
         Options parent = new OptionsBuilder().includeWarmup(".*").build();
         Options builder = new OptionsBuilder().parent(parent).build();
-        Assert.assertEquals(Arrays.asList(".*"), builder.getWarmupIncludes());
+        Assert.assertEquals(Collections.singletonList(".*"), builder.getWarmupIncludes());
     }
 
     @Test
--- a/jmh-core/src/test/java/org/openjdk/jmh/util/TestClassUtils.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-core/src/test/java/org/openjdk/jmh/util/TestClassUtils.java	Wed Nov 16 21:10:51 2016 +0100
@@ -28,6 +28,7 @@
 import org.junit.Test;
 
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 
@@ -44,7 +45,7 @@
 
     @Test
     public void testDenseClasses2() {
-        List<String> src = Arrays.asList("org.openjdk.benches.ForkJoinTest.test1");
+        List<String> src = Collections.singletonList("org.openjdk.benches.ForkJoinTest.test1");
         Map<String,String> map = ClassUtils.denseClassNames(src);
 
         Assert.assertEquals("ForkJoinTest.test1", map.get("org.openjdk.benches.ForkJoinTest.test1"));
@@ -52,7 +53,7 @@
 
     @Test
     public void testDenseClasses3() {
-        List<String> src = Arrays.asList("org.openjdk.benches.ForkJoinTest.test1:label1");
+        List<String> src = Collections.singletonList("org.openjdk.benches.ForkJoinTest.test1:label1");
         Map<String,String> map = ClassUtils.denseClassNames(src);
 
         Assert.assertEquals("ForkJoinTest.test1:label1", map.get("org.openjdk.benches.ForkJoinTest.test1:label1"));
--- a/jmh-generator-annprocess/src/main/java/org/openjdk/jmh/generators/BenchmarkProcessor.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-generator-annprocess/src/main/java/org/openjdk/jmh/generators/BenchmarkProcessor.java	Wed Nov 16 21:10:51 2016 +0100
@@ -33,7 +33,6 @@
 import javax.annotation.processing.AbstractProcessor;
 import javax.annotation.processing.RoundEnvironment;
 import javax.annotation.processing.SupportedAnnotationTypes;
-import javax.annotation.processing.SupportedSourceVersion;
 import javax.lang.model.SourceVersion;
 import javax.lang.model.element.TypeElement;
 import java.util.Set;
--- a/jmh-generator-annprocess/src/main/java/org/openjdk/jmh/generators/annotations/APGeneratorDestinaton.java	Wed Nov 16 14:51:34 2016 +0100
+++ b/jmh-generator-annprocess/src/main/java/org/openjdk/jmh/generators/annotations/APGeneratorDestinaton.java	Wed Nov 16 21:10:51 2016 +0100
@@ -38,11 +38,9 @@
 
 public class APGeneratorDestinaton implements GeneratorDestination {
 
-    private final RoundEnvironment roundEnv;
     private final ProcessingEnvironment processingEnv;
 
     public APGeneratorDestinaton(RoundEnvironment roundEnv, ProcessingEnvironment processingEnv) {
-        this.roundEnv = roundEnv;
         this.processingEnv = processingEnv;
     }