Use Java 8 lambdas instead of anonymous classes in compiler modules

This commit is contained in:
Alexander Udalov
2017-04-01 01:37:15 +03:00
parent 6aa0f7bb65
commit 5ebee6ceca
109 changed files with 1528 additions and 2754 deletions
@@ -56,16 +56,13 @@ public class Preloader {
Method mainMethod = mainClass.getMethod("main", String[].class);
Runtime.getRuntime().addShutdownHook(
new Thread(new Runnable() {
@Override
public void run() {
if (options.measure) {
System.out.println();
System.out.println("=== Preloader's measurements: ");
System.out.format("Total time: %.3fs\n", (System.nanoTime() - startTime) / 1e9);
}
handler.done();
new Thread(() -> {
if (options.measure) {
System.out.println();
System.out.println("=== Preloader's measurements: ");
System.out.format("Total time: %.3fs\n", (System.nanoTime() - startTime) / 1e9);
}
handler.done();
})
);