changeset 166:3c48eec8add4

Switch to Java 8 by default.
author shade
date Mon, 11 Aug 2014 21:29:49 +0400
parents abc5d8611758
children aee2ada87e67
files jcstress-core/pom.xml jcstress-core/src/main/java/org/openjdk/jcstress/JCStress.java jcstress-core/src/main/java/org/openjdk/jcstress/Options.java jcstress-core/src/main/java/org/openjdk/jcstress/infra/Scheduler.java jcstress-core/src/main/java/org/openjdk/jcstress/infra/collectors/InProcessCollector.java jcstress-core/src/main/java/org/openjdk/jcstress/infra/collectors/MuxCollector.java jcstress-core/src/main/java/org/openjdk/jcstress/infra/collectors/NetworkInputCollector.java jcstress-core/src/main/java/org/openjdk/jcstress/infra/collectors/TestResult.java jcstress-core/src/main/java/org/openjdk/jcstress/infra/grading/ConsoleReportPrinter.java jcstress-core/src/main/java/org/openjdk/jcstress/infra/grading/DescriptionReader.java jcstress-core/src/main/java/org/openjdk/jcstress/infra/grading/ExceptionReportPrinter.java jcstress-core/src/main/java/org/openjdk/jcstress/infra/grading/HTMLReportPrinter.java jcstress-core/src/main/java/org/openjdk/jcstress/infra/grading/TestGrading.java jcstress-core/src/main/java/org/openjdk/jcstress/infra/processors/JCStressTestProcessor.java jcstress-core/src/main/java/org/openjdk/jcstress/infra/processors/TestInfo.java jcstress-core/src/main/java/org/openjdk/jcstress/infra/runners/Runner.java jcstress-core/src/main/java/org/openjdk/jcstress/infra/runners/TestList.java jcstress-core/src/main/java/org/openjdk/jcstress/util/Environment.java jcstress-core/src/main/java/org/openjdk/jcstress/util/HashCounter.java jcstress-core/src/main/java/org/openjdk/jcstress/util/HashMultimap.java jcstress-core/src/main/java/org/openjdk/jcstress/util/HashMultiset.java jcstress-core/src/main/java/org/openjdk/jcstress/util/LongHashMultiset.java jcstress-core/src/main/java/org/openjdk/jcstress/util/Multisets.java jcstress-core/src/main/java/org/openjdk/jcstress/util/OpenAddressHashCounter.java jcstress-core/src/main/java/org/openjdk/jcstress/util/OptionFormatter.java jcstress-core/src/main/java/org/openjdk/jcstress/util/Reflections.java jcstress-core/src/main/java/org/openjdk/jcstress/util/TreeMultimap.java jcstress-core/src/main/java/org/openjdk/jcstress/util/TreesetMultimap.java jcstress-core/src/main/java/org/openjdk/jcstress/util/UnsafeHolder.java jcstress-core/src/main/java/org/openjdk/jcstress/util/VMSupport.java jcstress-core/src/test/java/org/openjdk/jcstress/util/OpenAddressHashCounterTest.java jcstress-test-gen/pom.xml jcstress-test-gen/src/main/java/org/openjdk/jcstress/generator/ResultGenerator.java jcstress-test-gen/src/main/java/org/openjdk/jcstress/generator/Utils.java jcstress-test-gen/src/main/java/org/openjdk/jcstress/tracer/TraceGen.java tests-all/pom.xml tests-custom/pom.xml tests-custom/src/main/java/org/openjdk/jcstress/tests/executors/ThreadPoolExecutorKeepAliveTest.java tests-custom/src/main/java/org/openjdk/jcstress/tests/executors/ThreadPoolExecutorSizesTest.java tests-custom/src/main/java/org/openjdk/jcstress/tests/future/FutureTaskSetTest.java tests-custom/src/main/java/org/openjdk/jcstress/tests/interrupt/WeakReferenceTest.java tests-generated/pom.xml
diffstat 42 files changed, 153 insertions(+), 196 deletions(-) [+]
line wrap: on
line diff
--- a/jcstress-core/pom.xml	Wed Aug 06 02:45:33 2014 +0400
+++ b/jcstress-core/pom.xml	Mon Aug 11 21:29:49 2014 +0400
@@ -50,8 +50,8 @@
                 <artifactId>maven-compiler-plugin</artifactId>
                 <version>2.4</version>
                 <configuration>
-                    <source>1.6</source>
-                    <target>1.6</target>
+                    <source>1.8</source>
+                    <target>1.8</target>
                     <proc>none</proc>
                     <compilerArguments>
                         <Xlint:all/>
--- a/jcstress-core/src/main/java/org/openjdk/jcstress/JCStress.java	Wed Aug 06 02:45:33 2014 +0400
+++ b/jcstress-core/src/main/java/org/openjdk/jcstress/JCStress.java	Mon Aug 11 21:29:49 2014 +0400
@@ -180,9 +180,7 @@
                 collector.add(result);
             }
 
-        } catch (IOException ex) {
-            ex.printStackTrace();
-        } catch (InterruptedException ex) {
+        } catch (IOException | InterruptedException ex) {
             ex.printStackTrace();
         }
     }
@@ -224,7 +222,7 @@
     }
 
     public Collection<String> getSeparateExecutionCommand(Options opts, String test) {
-        List<String> command = new ArrayList<String>();
+        List<String> command = new ArrayList<>();
 
         // jvm path
         command.add(getDefaultJvm());
@@ -278,7 +276,7 @@
     }
 
     static SortedSet<String> getTests(final String filter) {
-        SortedSet<String> s = new TreeSet<String>();
+        SortedSet<String> s = new TreeSet<>();
 
         Pattern pattern = Pattern.compile(filter);
         for (String testName : TestList.tests()) {
--- a/jcstress-core/src/main/java/org/openjdk/jcstress/Options.java	Wed Aug 06 02:45:33 2014 +0400
+++ b/jcstress-core/src/main/java/org/openjdk/jcstress/Options.java	Mon Aug 11 21:29:49 2014 +0400
@@ -247,7 +247,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()));
 
         System.out.print(".");
@@ -323,7 +323,7 @@
 
     public Collection<String> buildForkedCmdLine() {
         // omit -f, -p, -t
-        Collection<String> cmdLine = new ArrayList<String>();
+        Collection<String> cmdLine = new ArrayList<>();
         cmdLine.add("-r");
         cmdLine.add(resultDir);
         cmdLine.add("-minStride");
--- a/jcstress-core/src/main/java/org/openjdk/jcstress/infra/Scheduler.java	Wed Aug 06 02:45:33 2014 +0400
+++ b/jcstress-core/src/main/java/org/openjdk/jcstress/infra/Scheduler.java	Mon Aug 11 21:29:49 2014 +0400
@@ -39,14 +39,11 @@
 
     private final Semaphore sentinel;
 
-    private final ExecutorService services = Executors.newCachedThreadPool(new ThreadFactory() {
-        @Override
-        public Thread newThread(Runnable r) {
-            Thread t = new Thread(r);
-            t.setPriority(Thread.MAX_PRIORITY);
-            t.setDaemon(true);
-            return t;
-        }
+    private final ExecutorService services = Executors.newCachedThreadPool(r -> {
+        Thread t = new Thread(r);
+        t.setPriority(Thread.MAX_PRIORITY);
+        t.setDaemon(true);
+        return t;
     });
     private final int totalTokens;
 
@@ -59,14 +56,11 @@
         // Make fat tasks bypass in exclusive mode
         final int tokensAcquired = Math.min(task.getTokens(), totalTokens);
         sentinel.acquire(tokensAcquired);
-        services.submit(new Runnable() {
-            @Override
-            public void run() {
-                try {
-                    task.run();
-                } finally {
-                    sentinel.release(tokensAcquired);
-                }
+        services.submit(() -> {
+            try {
+                task.run();
+            } finally {
+                sentinel.release(tokensAcquired);
             }
         });
     }
--- a/jcstress-core/src/main/java/org/openjdk/jcstress/infra/collectors/InProcessCollector.java	Wed Aug 06 02:45:33 2014 +0400
+++ b/jcstress-core/src/main/java/org/openjdk/jcstress/infra/collectors/InProcessCollector.java	Mon Aug 11 21:29:49 2014 +0400
@@ -34,7 +34,7 @@
  */
 public class InProcessCollector implements TestResultCollector {
 
-    private final List<TestResult> results = Collections.synchronizedList(new ArrayList<TestResult>());
+    private final List<TestResult> results = Collections.synchronizedList(new ArrayList<>());
 
     @Override
     public void add(TestResult result) {
--- a/jcstress-core/src/main/java/org/openjdk/jcstress/infra/collectors/MuxCollector.java	Wed Aug 06 02:45:33 2014 +0400
+++ b/jcstress-core/src/main/java/org/openjdk/jcstress/infra/collectors/MuxCollector.java	Mon Aug 11 21:29:49 2014 +0400
@@ -35,7 +35,7 @@
  */
 public class MuxCollector implements TestResultCollector {
 
-    private final List<TestResultCollector> collectors = new ArrayList<TestResultCollector>();
+    private final List<TestResultCollector> collectors = new ArrayList<>();
 
     public MuxCollector(TestResultCollector[] args) {
         collectors.addAll(Arrays.asList(args));
--- a/jcstress-core/src/main/java/org/openjdk/jcstress/infra/collectors/NetworkInputCollector.java	Wed Aug 06 02:45:33 2014 +0400
+++ b/jcstress-core/src/main/java/org/openjdk/jcstress/infra/collectors/NetworkInputCollector.java	Mon Aug 11 21:29:49 2014 +0400
@@ -56,7 +56,7 @@
     public NetworkInputCollector(TestResultCollector out) throws IOException {
         this.out = out;
 
-        registeredReaders = Collections.synchronizedList(new ArrayList<Reader>());
+        registeredReaders = Collections.synchronizedList(new ArrayList<>());
 
         acceptor = new Acceptor();
         acceptor.start();
@@ -172,13 +172,7 @@
                 }
             } catch (EOFException e) {
                 // expect
-            } catch (ObjectStreamException e) {
-                throw new IllegalStateException(e);
-            } catch (InterruptedIOException e) {
-                throw new IllegalStateException(e);
-            } catch (IOException e) {
-                throw new IllegalStateException(e);
-            } catch (ClassNotFoundException e) {
+            } catch (ClassNotFoundException | IOException e) {
                 throw new IllegalStateException(e);
             } finally {
                 close();
--- a/jcstress-core/src/main/java/org/openjdk/jcstress/infra/collectors/TestResult.java	Wed Aug 06 02:45:33 2014 +0400
+++ b/jcstress-core/src/main/java/org/openjdk/jcstress/infra/collectors/TestResult.java	Mon Aug 11 21:29:49 2014 +0400
@@ -54,8 +54,8 @@
         this.vmID = VM_ID;
         this.name = name;
         this.status = status;
-        this.states = new HashMap<State, State>();
-        this.auxData = new ArrayList<String>();
+        this.states = new HashMap<>();
+        this.auxData = new ArrayList<>();
     }
 
     public void addState(Object result, long count) {
--- a/jcstress-core/src/main/java/org/openjdk/jcstress/infra/grading/ConsoleReportPrinter.java	Wed Aug 06 02:45:33 2014 +0400
+++ b/jcstress-core/src/main/java/org/openjdk/jcstress/infra/grading/ConsoleReportPrinter.java	Mon Aug 11 21:29:49 2014 +0400
@@ -61,7 +61,7 @@
     private AtomicLong observedResults = new AtomicLong();
     private AtomicLong observedCount = new AtomicLong();
 
-    private final ConcurrentMap<String, TestProgress> testsProgress = new ConcurrentHashMap<String, TestProgress>();
+    private final ConcurrentMap<String, TestProgress> testsProgress = new ConcurrentHashMap<>();
     private final int totalExpectedResults;
 
     private long firstTest;
@@ -172,7 +172,7 @@
 
             output.printf("%" + len + "s %15s %18s %-20s\n", "Observed state", "Occurrences", "Expectation", "Interpretation");
 
-            List<State> unmatchedStates = new ArrayList<State>();
+            List<State> unmatchedStates = new ArrayList<>();
             unmatchedStates.addAll(r.getStates());
             for (Case c : test.getCase()) {
 
@@ -278,8 +278,8 @@
         private final String name;
 
         private int currentVM;
-        private final Map<String, Integer> vmIDs = new HashMap<String, Integer>();
-        private final Map<String, Integer> iterations = new HashMap<String, Integer>();
+        private final Map<String, Integer> vmIDs = new HashMap<>();
+        private final Map<String, Integer> iterations = new HashMap<>();
 
         public TestProgress(TestResult result){
             this.name = result.getName();
--- a/jcstress-core/src/main/java/org/openjdk/jcstress/infra/grading/DescriptionReader.java	Wed Aug 06 02:45:33 2014 +0400
+++ b/jcstress-core/src/main/java/org/openjdk/jcstress/infra/grading/DescriptionReader.java	Mon Aug 11 21:29:49 2014 +0400
@@ -57,7 +57,7 @@
     private final Unmarshaller testSuiteUnmarshaller;
 
     public DescriptionReader() {
-        testDescriptions = new HashMap<String, Test>();
+        testDescriptions = new HashMap<>();
         try {
             SchemaFactory sf = SchemaFactory.newInstance(javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI);
 
@@ -67,9 +67,7 @@
             testSuiteUnmarshaller.setSchema(sf.newSchema(getClass().getResource("/xsd/descriptions/test-descriptions.xsd")));
 
             readDescriptions();
-        } catch (SAXException e) {
-            throw new IllegalStateException(e);
-        } catch (JAXBException e) {
+        } catch (SAXException | JAXBException e) {
             throw new IllegalStateException(e);
         }
     }
@@ -88,7 +86,7 @@
             throw new IllegalStateException(name + ": " + e.getMessage(), e);
         }
 
-        Map<String, Template> templates = new HashMap<String, Template>();
+        Map<String, Template> templates = new HashMap<>();
         for (Template t : suite.getTemplate()) {
             templates.put(t.getName(), t);
         }
@@ -106,7 +104,7 @@
     }
 
     private void splitCases(Collection<Case> cases) {
-        List<Case> newCases = new ArrayList<Case>();
+        List<Case> newCases = new ArrayList<>();
         for (Case c : cases) {
             for (String match : c.getMatch()) {
                 Case newCase = new Case();
@@ -131,9 +129,9 @@
         splitCases(template.getCase());
 
         // merge the matches
-        Collection<Case> newCases = new ArrayList<Case>();
+        Collection<Case> newCases = new ArrayList<>();
 
-        Set<String> fulfilledMatches = new HashSet<String>();
+        Set<String> fulfilledMatches = new HashSet<>();
         for (Case c : t.getCase()) {
             fulfilledMatches.add(c.getMatch().get(0));
             newCases.add(c);
@@ -154,7 +152,7 @@
         }
 
         // merge refs
-        Set<String> urls = new HashSet<String>();
+        Set<String> urls = new HashSet<>();
         if (t.getRefs() == null) {
             t.setRefs(new ObjectFactory().createRef());
         }
--- a/jcstress-core/src/main/java/org/openjdk/jcstress/infra/grading/ExceptionReportPrinter.java	Wed Aug 06 02:45:33 2014 +0400
+++ b/jcstress-core/src/main/java/org/openjdk/jcstress/infra/grading/ExceptionReportPrinter.java	Mon Aug 11 21:29:49 2014 +0400
@@ -59,14 +59,14 @@
     public ExceptionReportPrinter(Options opts, InProcessCollector collector) throws JAXBException, FileNotFoundException {
         super();
         this.collector = collector;
-        failures = new ArrayList<String>();
+        failures = new ArrayList<>();
     }
 
     public void parse() throws FileNotFoundException, JAXBException {
-        Map<String, TestResult> results = new TreeMap<String, TestResult>();
+        Map<String, TestResult> results = new TreeMap<>();
 
         {
-            Multimap<String, TestResult> multiResults = new HashMultimap<String, TestResult>();
+            Multimap<String, TestResult> multiResults = new HashMultimap<>();
             for (TestResult r : collector.getTestResults()) {
                 multiResults.put(r.getName(), r);
             }
@@ -74,7 +74,7 @@
             for (String name : multiResults.keys()) {
                 Collection<TestResult> mergeable = multiResults.get(name);
 
-                LongHashMultiset<State> stateCounts = new LongHashMultiset<State>();
+                LongHashMultiset<State> stateCounts = new LongHashMultiset<>();
 
                 Status status = Status.NORMAL;
                 for (TestResult r : mergeable) {
@@ -95,7 +95,7 @@
         }
 
         // build prefixes
-        Multimap<String, String> packages = new TreeMultimap<String, String>();
+        Multimap<String, String> packages = new TreeMultimap<>();
         for (String k : results.keySet()) {
             String pack = k.substring(0, k.lastIndexOf("."));
             packages.put(pack, k);
--- a/jcstress-core/src/main/java/org/openjdk/jcstress/infra/grading/HTMLReportPrinter.java	Wed Aug 06 02:45:33 2014 +0400
+++ b/jcstress-core/src/main/java/org/openjdk/jcstress/infra/grading/HTMLReportPrinter.java	Mon Aug 11 21:29:49 2014 +0400
@@ -77,10 +77,10 @@
 
     public void parse() throws FileNotFoundException, JAXBException {
 
-        Map<String, TestResult> results = new TreeMap<String, TestResult>();
+        Map<String, TestResult> results = new TreeMap<>();
 
         {
-            Multimap<String, TestResult> multiResults = new HashMultimap<String, TestResult>();
+            Multimap<String, TestResult> multiResults = new HashMultimap<>();
             for (TestResult r : collector.getTestResults()) {
                 multiResults.put(r.getName(), r);
             }
@@ -88,9 +88,9 @@
             for (String name : multiResults.keys()) {
                 Collection<TestResult> mergeable = multiResults.get(name);
 
-                LongHashMultiset<State> stateCounts = new LongHashMultiset<State>();
+                LongHashMultiset<State> stateCounts = new LongHashMultiset<>();
 
-                List<String> auxData = new ArrayList<String>();
+                List<String> auxData = new ArrayList<>();
 
                 Status status = Status.NORMAL;
                 Environment env = null;
@@ -120,7 +120,7 @@
         }
 
         // build prefixes
-        Multimap<String, String> packages = new TreeMultimap<String, String>();
+        Multimap<String, String> packages = new TreeMultimap<>();
         for (String k : results.keySet()) {
             String pack = k.substring(0, k.lastIndexOf("."));
             packages.put(pack, k);
@@ -212,7 +212,7 @@
         output.println("<td width=100>");
 
         {
-            SortedMap<String, String> env = new TreeMap<String, String>();
+            SortedMap<String, String> env = new TreeMap<>();
             for (String k : packages.keys()) {
                 for (String testName : packages.get(k)) {
                     TestResult result = results.get(testName);
@@ -558,7 +558,7 @@
         output.println("<th width=50>Refs</th>");
         output.println("</tr>");
 
-        List<State> unmatchedStates = new ArrayList<State>();
+        List<State> unmatchedStates = new ArrayList<>();
         unmatchedStates.addAll(r.getStates());
         for (Case c : test.getCase()) {
 
--- a/jcstress-core/src/main/java/org/openjdk/jcstress/infra/grading/TestGrading.java	Wed Aug 06 02:45:33 2014 +0400
+++ b/jcstress-core/src/main/java/org/openjdk/jcstress/infra/grading/TestGrading.java	Mon Aug 11 21:29:49 2014 +0400
@@ -44,7 +44,7 @@
     public final List<String> failureMessages;
 
     public TestGrading(TestResult r, Test test) {
-        failureMessages = new NonNullArrayList<String>();
+        failureMessages = new NonNullArrayList<>();
 
         if (test == null) {
             isPassed = false;
@@ -58,7 +58,7 @@
         hasInteresting = false;
         hasSpec = false;
 
-        List<State> unmatchedStates = new ArrayList<State>();
+        List<State> unmatchedStates = new ArrayList<>();
         unmatchedStates.addAll(r.getStates());
         for (Case c : test.getCase()) {
             boolean matched = false;
--- a/jcstress-core/src/main/java/org/openjdk/jcstress/infra/processors/JCStressTestProcessor.java	Wed Aug 06 02:45:33 2014 +0400
+++ b/jcstress-core/src/main/java/org/openjdk/jcstress/infra/processors/JCStressTestProcessor.java	Mon Aug 11 21:29:49 2014 +0400
@@ -77,7 +77,7 @@
 @SupportedSourceVersion(SourceVersion.RELEASE_6)
 public class JCStressTestProcessor extends AbstractProcessor {
 
-    private final List<TestInfo> tests = new ArrayList<TestInfo>();
+    private final List<TestInfo> tests = new ArrayList<>();
 
     @Override
     public Set<String> getSupportedAnnotationTypes() {
@@ -344,16 +344,25 @@
         for (VariableElement var : ElementFilter.fieldsIn(info.getResult().getEnclosedElements())) {
             pw.print("                r." + var.getSimpleName().toString() + " = ");
             String type = var.asType().toString();
-            if (type.equals("int") || type.equals("long") || type.equals("short") || type.equals("byte") || type.equals("char")) {
-                pw.print("0");
-            } else if (type.equals("double")) {
-                pw.print("0D");
-            } else if (type.equals("float")) {
-                pw.print("0F");
-            } else if (type.equals("boolean")) {
-                pw.print("false");
-            } else {
-                throw new GenerationException("Unable to handle @" + Result.class.getSimpleName() + " field of type " + type, var);
+            switch (type) {
+                case "int":
+                case "long":
+                case "short":
+                case "byte":
+                case "char":
+                    pw.print("0");
+                    break;
+                case "double":
+                    pw.print("0D");
+                    break;
+                case "float":
+                    pw.print("0F");
+                    break;
+                case "boolean":
+                    pw.print("false");
+                    break;
+                default:
+                    throw new GenerationException("Unable to handle @" + Result.class.getSimpleName() + " field of type " + type, var);
             }
             pw.println(";");
         }
--- a/jcstress-core/src/main/java/org/openjdk/jcstress/infra/processors/TestInfo.java	Wed Aug 06 02:45:33 2014 +0400
+++ b/jcstress-core/src/main/java/org/openjdk/jcstress/infra/processors/TestInfo.java	Mon Aug 11 21:29:49 2014 +0400
@@ -47,7 +47,7 @@
     private boolean requiresFork;
 
     public TestInfo() {
-        actors = new ArrayList<ExecutableElement>();
+        actors = new ArrayList<>();
     }
 
     public void addActor(ExecutableElement element) {
--- a/jcstress-core/src/main/java/org/openjdk/jcstress/infra/runners/Runner.java	Wed Aug 06 02:45:33 2014 +0400
+++ b/jcstress-core/src/main/java/org/openjdk/jcstress/infra/runners/Runner.java	Mon Aug 11 21:29:49 2014 +0400
@@ -75,17 +75,7 @@
 
         try {
             sanityCheck();
-        } catch (NoClassDefFoundError e) {
-            testLog.println("Test sanity check failed, skipping");
-            testLog.println();
-            dumpFailure(testName, Status.API_MISMATCH, e);
-            return;
-        } catch (NoSuchFieldError e) {
-            testLog.println("Test sanity check failed, skipping");
-            testLog.println();
-            dumpFailure(testName, Status.API_MISMATCH, e);
-            return;
-        } catch (NoSuchMethodError e) {
+        } catch (NoClassDefFoundError | NoSuchMethodError | NoSuchFieldError e) {
             testLog.println("Test sanity check failed, skipping");
             testLog.println();
             dumpFailure(testName, Status.API_MISMATCH, e);
--- a/jcstress-core/src/main/java/org/openjdk/jcstress/infra/runners/TestList.java	Wed Aug 06 02:45:33 2014 +0400
+++ b/jcstress-core/src/main/java/org/openjdk/jcstress/infra/runners/TestList.java	Mon Aug 11 21:29:49 2014 +0400
@@ -41,7 +41,7 @@
 
     private static Map<String, Info> getTests() {
         if (tests == null) {
-            Map<String, Info> m = new HashMap<String, Info>();
+            Map<String, Info> m = new HashMap<>();
             InputStream stream = null;
             try {
                 stream = TestList.class.getResourceAsStream(LIST);
--- a/jcstress-core/src/main/java/org/openjdk/jcstress/util/Environment.java	Wed Aug 06 02:45:33 2014 +0400
+++ b/jcstress-core/src/main/java/org/openjdk/jcstress/util/Environment.java	Mon Aug 11 21:29:49 2014 +0400
@@ -45,7 +45,7 @@
     private final Map<String, String> env;
 
     public Environment() {
-        Map<String, String> result = new HashMap<String, String>();
+        Map<String, String> result = new HashMap<>();
 
         String[] keys = new String[]{
                 "java.version",
--- a/jcstress-core/src/main/java/org/openjdk/jcstress/util/HashCounter.java	Wed Aug 06 02:45:33 2014 +0400
+++ b/jcstress-core/src/main/java/org/openjdk/jcstress/util/HashCounter.java	Mon Aug 11 21:29:49 2014 +0400
@@ -35,7 +35,7 @@
 
 public class HashCounter<T> implements Counter<T> {
 
-    private Map<T, Holder> ms = new HashMap<T, Holder>();
+    private Map<T, Holder> ms = new HashMap<>();
 
     @Override
     public void record(T result) {
@@ -66,9 +66,7 @@
             T t = (T)ois.readObject();
 
             return t;
-        } catch (IOException e) {
-            throw new IllegalStateException(e);
-        } catch (ClassNotFoundException e) {
+        } catch (IOException | ClassNotFoundException e) {
             throw new IllegalStateException(e);
         }
     }
--- a/jcstress-core/src/main/java/org/openjdk/jcstress/util/HashMultimap.java	Wed Aug 06 02:45:33 2014 +0400
+++ b/jcstress-core/src/main/java/org/openjdk/jcstress/util/HashMultimap.java	Mon Aug 11 21:29:49 2014 +0400
@@ -60,14 +60,14 @@
     private final Map<K, Collection<V>> map;
 
     public HashMultimap() {
-        map = new HashMap<K, Collection<V>>();
+        map = new HashMap<>();
     }
 
     @Override
     public void put(K key, V value) {
         Collection<V> vs = map.get(key);
         if (vs == null) {
-            vs = new ArrayList<V>();
+            vs = new ArrayList<>();
             map.put(key, vs);
         }
         vs.add(value);
@@ -96,7 +96,7 @@
 
     @Override
     public Collection<V> values() {
-        Collection<V> result = new ArrayList<V>();
+        Collection<V> result = new ArrayList<>();
         for (K key : map.keySet()) {
             result.addAll(map.get(key));
         }
--- a/jcstress-core/src/main/java/org/openjdk/jcstress/util/HashMultiset.java	Wed Aug 06 02:45:33 2014 +0400
+++ b/jcstress-core/src/main/java/org/openjdk/jcstress/util/HashMultiset.java	Mon Aug 11 21:29:49 2014 +0400
@@ -60,7 +60,7 @@
     private int size;
 
     public HashMultiset() {
-        map = new HashMap<T, Integer>();
+        map = new HashMap<>();
     }
 
     @Override
--- a/jcstress-core/src/main/java/org/openjdk/jcstress/util/LongHashMultiset.java	Wed Aug 06 02:45:33 2014 +0400
+++ b/jcstress-core/src/main/java/org/openjdk/jcstress/util/LongHashMultiset.java	Mon Aug 11 21:29:49 2014 +0400
@@ -30,7 +30,7 @@
 
 public class LongHashMultiset<T> {
 
-    private Map<T, Holder> ms = new HashMap<T, Holder>();
+    private Map<T, Holder> ms = new HashMap<>();
 
     public void add(T t, long count) {
         Holder holder = ms.get(t);
--- a/jcstress-core/src/main/java/org/openjdk/jcstress/util/Multisets.java	Wed Aug 06 02:45:33 2014 +0400
+++ b/jcstress-core/src/main/java/org/openjdk/jcstress/util/Multisets.java	Mon Aug 11 21:29:49 2014 +0400
@@ -58,18 +58,13 @@
 
     public static <T> Collection<T> countHighest(Multiset<T> set, int top) {
         // crude and inefficient
-        PriorityQueue<Pair<T, Integer>> q = new PriorityQueue<Pair<T, Integer>>(10, new Comparator<Pair<T, Integer>>() {
-            @Override
-            public int compare(Pair<T, Integer> o1, Pair<T, Integer> o2) {
-                return o2.k2.compareTo(o1.k2);
-            }
-        });
+        PriorityQueue<Pair<T, Integer>> q = new PriorityQueue<>(10, (o1, o2) -> o2.k2.compareTo(o1.k2));
 
         for (T key : set.keys()) {
-            q.add(new Pair<T, Integer>(key, set.count(key)));
+            q.add(new Pair<>(key, set.count(key)));
         }
 
-        List<T> result = new ArrayList<T>();
+        List<T> result = new ArrayList<>();
         for (int t = 0; (t < top && !q.isEmpty()); t++) {
             result.add(q.poll().k1);
         }
--- a/jcstress-core/src/main/java/org/openjdk/jcstress/util/OpenAddressHashCounter.java	Wed Aug 06 02:45:33 2014 +0400
+++ b/jcstress-core/src/main/java/org/openjdk/jcstress/util/OpenAddressHashCounter.java	Mon Aug 11 21:29:49 2014 +0400
@@ -163,16 +163,14 @@
             T t = (T)ois.readObject();
 
             return t;
-        } catch (IOException e) {
-            throw new IllegalStateException(e);
-        } catch (ClassNotFoundException e) {
+        } catch (IOException | ClassNotFoundException e) {
             throw new IllegalStateException(e);
         }
     }
 
     @Override
     public Collection<R> elementSet() {
-        List<R> res = new ArrayList<R>();
+        List<R> res = new ArrayList<>();
         for (Object k : keys) {
             if (k != null) {
                 @SuppressWarnings("unchecked")
--- a/jcstress-core/src/main/java/org/openjdk/jcstress/util/OptionFormatter.java	Wed Aug 06 02:45:33 2014 +0400
+++ b/jcstress-core/src/main/java/org/openjdk/jcstress/util/OptionFormatter.java	Mon Aug 11 21:29:49 2014 +0400
@@ -52,7 +52,7 @@
     }
 
     private 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;
--- a/jcstress-core/src/main/java/org/openjdk/jcstress/util/Reflections.java	Wed Aug 06 02:45:33 2014 +0400
+++ b/jcstress-core/src/main/java/org/openjdk/jcstress/util/Reflections.java	Mon Aug 11 21:29:49 2014 +0400
@@ -52,7 +52,7 @@
         try {
             ensureResourceInited();
 
-            List<String> res = new ArrayList<String>();
+            List<String> res = new ArrayList<>();
             for (String name : RESOURCES) {
                 if (!name.contains(filter)) continue;
                 if (!name.endsWith(postfix)) continue;
@@ -67,14 +67,9 @@
 
     private static void ensureResourceInited() throws IOException {
         if (!RESOURCE_INITED) {
-            final SortedSet<String> newResources = new TreeSet<String>();
+            final SortedSet<String> newResources = new TreeSet<>();
             try {
-                enumerate(new ResultCallback() {
-                    @Override
-                    public void accept(String name) {
-                        newResources.add(name);
-                    }
-                });
+                enumerate(newResources::add);
             } catch (Throwable t) {
                 throw new IOException(t);
             }
@@ -84,7 +79,7 @@
     }
 
     public static Collection<Class> getClasses(final String filter) throws IOException {
-        final List<Class> newClasses = new ArrayList<Class>();
+        final List<Class> newClasses = new ArrayList<>();
         for (String name : getClassNames(filter)) {
             try {
                 if (name.contains("VMSupport")) continue;
@@ -99,7 +94,7 @@
     public static Collection<String> getClassNames(final String filter) throws IOException {
         ensureResourceInited();
 
-        final List<String> newClasses = new ArrayList<String>();
+        final List<String> newClasses = new ArrayList<>();
         for (String name : RESOURCES) {
             name = name.replaceAll("\\\\", ".");
             name = name.replaceAll("/", ".");
@@ -128,12 +123,12 @@
 
     private static void enumeratePath(String dir, final ResultCallback callback) throws IOException {
 
-        List<File> dirs = new ArrayList<File>();
+        List<File> dirs = new ArrayList<>();
         dirs.add(new File(dir));
 
         while (!dirs.isEmpty()) {
 
-            List<File> siblings = new ArrayList<File>();
+            List<File> siblings = new ArrayList<>();
             for (File d : dirs) {
                 for (File f : d.listFiles()) {
                     if (f.isDirectory()) {
--- a/jcstress-core/src/main/java/org/openjdk/jcstress/util/TreeMultimap.java	Wed Aug 06 02:45:33 2014 +0400
+++ b/jcstress-core/src/main/java/org/openjdk/jcstress/util/TreeMultimap.java	Mon Aug 11 21:29:49 2014 +0400
@@ -60,14 +60,14 @@
     private final Map<K, Collection<V>> map;
 
     public TreeMultimap() {
-        map = new TreeMap<K, Collection<V>>();
+        map = new TreeMap<>();
     }
 
     @Override
     public void put(K key, V value) {
         Collection<V> vs = map.get(key);
         if (vs == null) {
-            vs = new ArrayList<V>();
+            vs = new ArrayList<>();
             map.put(key, vs);
         }
         vs.add(value);
@@ -96,7 +96,7 @@
 
     @Override
     public Collection<V> values() {
-        Collection<V> result = new ArrayList<V>();
+        Collection<V> result = new ArrayList<>();
         for (K key : map.keySet()) {
             result.addAll(map.get(key));
         }
--- a/jcstress-core/src/main/java/org/openjdk/jcstress/util/TreesetMultimap.java	Wed Aug 06 02:45:33 2014 +0400
+++ b/jcstress-core/src/main/java/org/openjdk/jcstress/util/TreesetMultimap.java	Mon Aug 11 21:29:49 2014 +0400
@@ -61,14 +61,14 @@
     private final Map<K, Collection<V>> map;
 
     public TreesetMultimap() {
-        map = new HashMap<K, Collection<V>>();
+        map = new HashMap<>();
     }
 
     @Override
     public void put(K key, V value) {
         Collection<V> vs = map.get(key);
         if (vs == null) {
-            vs = new TreeSet<V>();
+            vs = new TreeSet<>();
             map.put(key, vs);
         }
         vs.add(value);
@@ -97,7 +97,7 @@
 
     @Override
     public Collection<V> values() {
-        Collection<V> result = new ArrayList<V>();
+        Collection<V> result = new ArrayList<>();
         for (K key : map.keySet()) {
             result.addAll(map.get(key));
         }
--- a/jcstress-core/src/main/java/org/openjdk/jcstress/util/UnsafeHolder.java	Wed Aug 06 02:45:33 2014 +0400
+++ b/jcstress-core/src/main/java/org/openjdk/jcstress/util/UnsafeHolder.java	Mon Aug 11 21:29:49 2014 +0400
@@ -50,14 +50,12 @@
         } catch (SecurityException se) {
             try {
                 return java.security.AccessController.doPrivileged
-                    (new java.security
-                     .PrivilegedExceptionAction<sun.misc.Unsafe>() {
-                        public sun.misc.Unsafe run() throws Exception {
-                            java.lang.reflect.Field f = sun.misc
-                                .Unsafe.class.getDeclaredField("theUnsafe");
-                            f.setAccessible(true);
-                            return (sun.misc.Unsafe) f.get(null);
-                        }});
+                    ((java.security.PrivilegedExceptionAction<sun.misc.Unsafe>) () -> {
+                        java.lang.reflect.Field f = sun.misc
+                            .Unsafe.class.getDeclaredField("theUnsafe");
+                        f.setAccessible(true);
+                        return (sun.misc.Unsafe) f.get(null);
+                    });
             } catch (java.security.PrivilegedActionException e) {
                 throw new RuntimeException("Could not initialize intrinsics",
                                            e.getCause());
--- a/jcstress-core/src/main/java/org/openjdk/jcstress/util/VMSupport.java	Wed Aug 06 02:45:33 2014 +0400
+++ b/jcstress-core/src/main/java/org/openjdk/jcstress/util/VMSupport.java	Mon Aug 11 21:29:49 2014 +0400
@@ -63,8 +63,8 @@
             try {
                 Collection<Method> im = infraMethods;
                 if (im == null) {
-                    im = new ArrayList<Method>();
-                    Collection<String> infraNames = new ArrayList<String>();
+                    im = new ArrayList<>();
+                    Collection<String> infraNames = new ArrayList<>();
                     infraNames.addAll(Reflections.getClassNames("org.openjdk.jcstress.infra"));
                     infraNames.addAll(Reflections.getClassNames("org.openjdk.jcstress.util"));
                     for (String name : infraNames) {
--- a/jcstress-core/src/test/java/org/openjdk/jcstress/util/OpenAddressHashCounterTest.java	Wed Aug 06 02:45:33 2014 +0400
+++ b/jcstress-core/src/test/java/org/openjdk/jcstress/util/OpenAddressHashCounterTest.java	Mon Aug 11 21:29:49 2014 +0400
@@ -7,7 +7,7 @@
 
     @Test
     public void test1() {
-        Counter<String> cnt = new OpenAddressHashCounter<String>();
+        Counter<String> cnt = new OpenAddressHashCounter<>();
         cnt.record("Foo");
 
         Assert.assertEquals(1, cnt.count("Foo"));
@@ -17,7 +17,7 @@
 
     @Test
     public void test2() {
-        Counter<String> cnt = new OpenAddressHashCounter<String>();
+        Counter<String> cnt = new OpenAddressHashCounter<>();
         cnt.record("Foo", 2);
 
         Assert.assertEquals(2, cnt.count("Foo"));
@@ -27,7 +27,7 @@
 
     @Test
     public void test3() {
-        Counter<String> cnt = new OpenAddressHashCounter<String>();
+        Counter<String> cnt = new OpenAddressHashCounter<>();
         cnt.record("Foo", 1);
         cnt.record("Bar", 1);
 
@@ -38,7 +38,7 @@
 
     @Test
     public void test4() {
-        Counter<String> cnt = new OpenAddressHashCounter<String>();
+        Counter<String> cnt = new OpenAddressHashCounter<>();
         for (int c = 0; c < 1000; c++) {
             cnt.record("Foo" + c, c);
         }
--- a/jcstress-test-gen/pom.xml	Wed Aug 06 02:45:33 2014 +0400
+++ b/jcstress-test-gen/pom.xml	Mon Aug 11 21:29:49 2014 +0400
@@ -46,8 +46,8 @@
                 <artifactId>maven-compiler-plugin</artifactId>
                 <version>2.4</version>
                 <configuration>
-                    <source>1.6</source>
-                    <target>1.6</target>
+                    <source>1.8</source>
+                    <target>1.8</target>
                 </configuration>
             </plugin>
             <plugin>
--- a/jcstress-test-gen/src/main/java/org/openjdk/jcstress/generator/ResultGenerator.java	Wed Aug 06 02:45:33 2014 +0400
+++ b/jcstress-test-gen/src/main/java/org/openjdk/jcstress/generator/ResultGenerator.java	Mon Aug 11 21:29:49 2014 +0400
@@ -30,7 +30,7 @@
 import java.util.Set;
 
 public class ResultGenerator {
-    private final Set<String> generatedResults = new HashSet<String>();
+    private final Set<String> generatedResults = new HashSet<>();
     private final String srcRoot;
 
     public ResultGenerator(String srcRoot) {
--- a/jcstress-test-gen/src/main/java/org/openjdk/jcstress/generator/Utils.java	Wed Aug 06 02:45:33 2014 +0400
+++ b/jcstress-test-gen/src/main/java/org/openjdk/jcstress/generator/Utils.java	Mon Aug 11 21:29:49 2014 +0400
@@ -39,18 +39,18 @@
 
     public static <T> List<List<T>> permutate(List<T> src) {
         if (src.size() <= 1) {
-            List<List<T>> al = new ArrayList<List<T>>();
+            List<List<T>> al = new ArrayList<>();
             al.add(src);
             return al;
         }
 
-        List<List<T>> result = new ArrayList<List<T>>();
+        List<List<T>> result = new ArrayList<>();
         for (int i = 0; i < src.size(); i++) {
-            List<T> copy = new ArrayList<T>(src);
+            List<T> copy = new ArrayList<>(src);
             T el = copy.remove(i);
 
             for (List<T> perm : permutate(copy)) {
-                List<T> c = new ArrayList<T>(perm);
+                List<T> c = new ArrayList<>(perm);
                 c.add(0, el);
                 result.add(c);
             }
--- a/jcstress-test-gen/src/main/java/org/openjdk/jcstress/tracer/TraceGen.java	Wed Aug 06 02:45:33 2014 +0400
+++ b/jcstress-test-gen/src/main/java/org/openjdk/jcstress/tracer/TraceGen.java	Mon Aug 11 21:29:49 2014 +0400
@@ -55,14 +55,14 @@
         }
         resourceWriter.println("<testsuite>");
 
-        List<Op> possibleOps = new ArrayList<Op>();
+        List<Op> possibleOps = new ArrayList<>();
         for (int v = 0; v < vars; v++) {
             for (Op.Type t : Op.Type.values()) {
                 possibleOps.add(new Op(t, v));
             }
         }
 
-        List<Trace> allTraces = new ArrayList<Trace>();
+        List<Trace> allTraces = new ArrayList<>();
         List<Trace> traces = Collections.singletonList(new Trace());
         for (int l = 0; l < possibleOps.size(); l++) {
             traces = product(traces, possibleOps);
@@ -70,7 +70,7 @@
         }
         System.out.println(traces.size() + " basic traces");
 
-        List<Trace> newTraces = new ArrayList<Trace>();
+        List<Trace> newTraces = new ArrayList<>();
         for (Trace trace : allTraces) {
             if (!trace.hasLoads()) continue;
             if (!trace.hasStores()) continue;
@@ -98,7 +98,7 @@
         traces = newTraces;
         System.out.println(traces.size() + " interesting traces");
 
-        List<MultiTrace> multiTraces = new ArrayList<MultiTrace>();
+        List<MultiTrace> multiTraces = new ArrayList<>();
         for (Trace trace : traces) {
             for (int l1 = 0; l1 < trace.getLength(); l1++) {
                 for (int l2 = l1; l2 < trace.getLength(); l2++) {
@@ -111,15 +111,15 @@
         }
         System.out.println(multiTraces.size() + " basic multi-traces");
 
-        Set<String> processedMultitraces = new HashSet<String>();
+        Set<String> processedMultitraces = new HashSet<>();
 
         int testCount = 0;
         for (MultiTrace mt : multiTraces) {
             if (!processedMultitraces.add(mt.canonicalId())) continue;
 
             List<Trace> linearTraces = mt.linearize();
-            Set<Map<Integer, Integer>> scResults = new HashSet<Map<Integer, Integer>>();
-            Set<Map<Integer, Integer>> allResults = new HashSet<Map<Integer, Integer>>();
+            Set<Map<Integer, Integer>> scResults = new HashSet<>();
+            Set<Map<Integer, Integer>> allResults = new HashSet<>();
 
             for (Trace linear : linearTraces) {
                 SortedMap<Integer, Integer> results = linear.interpret();
@@ -136,9 +136,9 @@
             assert allResults.containsAll(scResults);
             if (scResults.equals(allResults)) continue;
 
-            List<String> mappedResult = new ArrayList<String>();
+            List<String> mappedResult = new ArrayList<>();
             for (Map<Integer, Integer> m : scResults) {
-                List<String> mappedValues = new ArrayList<String>();
+                List<String> mappedValues = new ArrayList<>();
                 for (int v : m.values()) {
                     mappedValues.add(mapConst(v));
                 }
@@ -214,7 +214,7 @@
         pw.println("public class " + klass + " {");
         pw.println();
 
-        Set<Integer> exist = new HashSet<Integer>();
+        Set<Integer> exist = new HashSet<>();
         for (Trace trace : mt.traces)  {
             for (Op op : trace.ops) {
                 if (exist.add(op.getVarId()))
@@ -260,7 +260,7 @@
     }
 
     private List<Trace> product(List<Trace> traces, List<Op> ops) {
-        List<Trace> newTraces = new ArrayList<Trace>();
+        List<Trace> newTraces = new ArrayList<>();
         for (Trace trace : traces) {
             for (Op op : ops) {
                 newTraces.add(trace.pushTail(op));
@@ -273,11 +273,11 @@
         private final List<Op> ops;
 
         public Trace() {
-            ops = new ArrayList<Op>();
+            ops = new ArrayList<>();
         }
 
         public Trace(List<Op> extOps) {
-            ops = new ArrayList<Op>(extOps);
+            ops = new ArrayList<>(extOps);
         }
 
         public Trace pushHead(Op op) {
@@ -310,12 +310,12 @@
         }
 
         public SortedMap<Integer, Integer> interpret() {
-            Map<Integer, Integer> values = new HashMap<Integer, Integer>();
+            Map<Integer, Integer> values = new HashMap<>();
             for (int v = 0; v < vars; v++) {
                 values.put(v, -1);
             }
 
-            SortedMap<Integer, Integer> resValues = new TreeMap<Integer, Integer>();
+            SortedMap<Integer, Integer> resValues = new TreeMap<>();
 
             for (Op op : ops) {
                 switch (op.getType()) {
@@ -335,7 +335,7 @@
         }
 
         public List<Trace> allPermutations() {
-            List<Trace> traces = new ArrayList<Trace>();
+            List<Trace> traces = new ArrayList<>();
             for (List<Op> perm : Utils.permutate(ops)) {
                 traces.add(new Trace(perm));
             }
@@ -400,7 +400,7 @@
 
         public String canonicalId() {
             int varId = 0;
-            Map<Integer, Integer> varMap = new HashMap<Integer, Integer>();
+            Map<Integer, Integer> varMap = new HashMap<>();
             for (Op op : ops) {
                 Integer id = varMap.get(op.getVarId());
                 if (id == null) {
@@ -428,7 +428,7 @@
         }
 
         public boolean hasNonMatchingLoads() {
-            Set<Integer> stores = new HashSet<Integer>();
+            Set<Integer> stores = new HashSet<>();
             for (Op op : ops) {
                 if (op.getType() == Op.Type.STORE) {
                     stores.add(op.getVarId());
@@ -446,7 +446,7 @@
         }
 
         public boolean hasNonMatchingStores() {
-            Set<Integer> loads = new HashSet<Integer>();
+            Set<Integer> loads = new HashSet<>();
             for (Op op : ops) {
                 if (op.getType() == Op.Type.LOAD) {
                     loads.add(op.getVarId());
@@ -475,18 +475,13 @@
         public MultiTrace(Trace original, List<Trace> copy) {
             this.original = original;
 
-            this.traces = new ArrayList<Trace>();
+            this.traces = new ArrayList<>();
             for (Trace t : copy) {
                 if (!t.ops.isEmpty())
                     traces.add(t);
             }
 
-            Collections.sort(traces, new Comparator<Trace>() {
-                @Override
-                public int compare(Trace o1, Trace o2) {
-                    return o1.id().compareTo(o2.id());
-                }
-            });
+            Collections.sort(traces, (o1, o2) -> o1.id().compareTo(o2.id()));
         }
 
         public List<Trace> linearize() {
@@ -494,10 +489,10 @@
                 return Collections.singletonList(new Trace());
             }
 
-            List<Trace> newTraces = new ArrayList<Trace>();
+            List<Trace> newTraces = new ArrayList<>();
 
             for (int t = 0; t < traces.size(); t++) {
-                List<Trace> copy = new ArrayList<Trace>();
+                List<Trace> copy = new ArrayList<>();
                 copy.addAll(traces);
 
                 Trace cT = copy.get(t);
--- a/tests-all/pom.xml	Wed Aug 06 02:45:33 2014 +0400
+++ b/tests-all/pom.xml	Mon Aug 11 21:29:49 2014 +0400
@@ -50,8 +50,8 @@
                 <artifactId>maven-compiler-plugin</artifactId>
                 <version>2.4</version>
                 <configuration>
-                    <source>1.6</source>
-                    <target>1.6</target>
+                    <source>1.8</source>
+                    <target>1.8</target>
                 </configuration>
             </plugin>
             <plugin>
--- a/tests-custom/pom.xml	Wed Aug 06 02:45:33 2014 +0400
+++ b/tests-custom/pom.xml	Mon Aug 11 21:29:49 2014 +0400
@@ -50,8 +50,8 @@
                 <artifactId>maven-compiler-plugin</artifactId>
                 <version>2.4</version>
                 <configuration>
-                    <source>1.6</source>
-                    <target>1.6</target>
+                    <source>1.8</source>
+                    <target>1.8</target>
                 </configuration>
             </plugin>
             <plugin>
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/executors/ThreadPoolExecutorKeepAliveTest.java	Wed Aug 06 02:45:33 2014 +0400
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/executors/ThreadPoolExecutorKeepAliveTest.java	Mon Aug 11 21:29:49 2014 +0400
@@ -39,7 +39,7 @@
 public class ThreadPoolExecutorKeepAliveTest {
 
     public final ThreadPoolExecutor pool = new ThreadPoolExecutor(1, 2, 1L,
-            TimeUnit.MILLISECONDS, new ArrayBlockingQueue<Runnable>(2));
+            TimeUnit.MILLISECONDS, new ArrayBlockingQueue<>(2));
 
     @Actor
     public void actor1() {
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/executors/ThreadPoolExecutorSizesTest.java	Wed Aug 06 02:45:33 2014 +0400
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/executors/ThreadPoolExecutorSizesTest.java	Mon Aug 11 21:29:49 2014 +0400
@@ -39,7 +39,7 @@
 public class ThreadPoolExecutorSizesTest {
 
     public final ThreadPoolExecutor pool = new ThreadPoolExecutor(1, 4, 0L,
-            TimeUnit.MILLISECONDS, new ArrayBlockingQueue<Runnable>(4));
+            TimeUnit.MILLISECONDS, new ArrayBlockingQueue<>(4));
 
     @Actor
     public void actor1() {
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/future/FutureTaskSetTest.java	Wed Aug 06 02:45:33 2014 +0400
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/future/FutureTaskSetTest.java	Mon Aug 11 21:29:49 2014 +0400
@@ -48,9 +48,7 @@
         try {
             Integer key = s.get(1, TimeUnit.HOURS);
             r.r1 = (key == null) ? -1 : key;
-        } catch (InterruptedException e) {
-            r.r1 = Integer.MIN_VALUE;
-        } catch (ExecutionException e) {
+        } catch (InterruptedException | ExecutionException e) {
             r.r1 = Integer.MIN_VALUE;
         } catch (TimeoutException e) {
             r.r1 = -2;
@@ -59,11 +57,8 @@
 
     @State
     public static class MyFutureTask extends FutureTask<Integer> {
-        private static final Callable<Integer> EMPTY_CALLABLE = new Callable<Integer>() {
-            @Override
-            public Integer call() throws Exception {
-                throw new IllegalStateException("Should not reach here");
-            }
+        private static final Callable<Integer> EMPTY_CALLABLE = () -> {
+            throw new IllegalStateException("Should not reach here");
         };
 
         public MyFutureTask() {
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/interrupt/WeakReferenceTest.java	Wed Aug 06 02:45:33 2014 +0400
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/interrupt/WeakReferenceTest.java	Mon Aug 11 21:29:49 2014 +0400
@@ -44,8 +44,8 @@
 
     public WeakReferenceTest() {
         referent = new Object();
-        refQueue = new ReferenceQueue<Object>();
-        ref = new WeakReference<Object>(referent, refQueue);
+        refQueue = new ReferenceQueue<>();
+        ref = new WeakReference<>(referent, refQueue);
     }
 
 
--- a/tests-generated/pom.xml	Wed Aug 06 02:45:33 2014 +0400
+++ b/tests-generated/pom.xml	Mon Aug 11 21:29:49 2014 +0400
@@ -50,8 +50,8 @@
                 <artifactId>maven-compiler-plugin</artifactId>
                 <version>2.4</version>
                 <configuration>
-                    <source>1.6</source>
-                    <target>1.6</target>
+                    <source>1.8</source>
+                    <target>1.8</target>
                     <debug>false</debug>
                     <meminitial>4096</meminitial>
                     <fork>true</fork>