--- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/Eval.java Fri Dec 16 12:08:46 2016 +0100
+++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/Eval.java Fri Dec 16 15:27:34 2016 +0000
@@ -635,7 +635,7 @@
while (true) {
state.debug(DBG_GEN, "compileAndLoad %s\n", ins);
- ins.stream().forEach(u -> u.initialize());
+ ins.stream().forEach(Unit::initialize);
ins.stream().forEach(u -> u.setWrap(ins, ins));
AnalyzeTask at = state.taskFactory.new AnalyzeTask(outerWrapSet(ins));
ins.stream().forEach(u -> u.setDiagnostics(at));
@@ -654,7 +654,7 @@
boolean success;
while (true) {
List<Unit> legit = ins.stream()
- .filter(u -> u.isDefined())
+ .filter(Unit::isDefined)
.collect(toList());
state.debug(DBG_GEN, "compileAndLoad ins = %s -- legit = %s\n",
ins, legit);
@@ -693,7 +693,7 @@
// loop by replacing all that have been replaced
if (!toReplace.isEmpty()) {
replaced.addAll(toReplace);
- replaced.stream().forEach(u -> u.markForReplacement());
+ replaced.stream().forEach(Unit::markForReplacement);
}
success = toReplace.isEmpty();
@@ -703,7 +703,7 @@
// add any new dependencies to the working set
List<Unit> newDependencies = ins.stream()
- .flatMap(u -> u.effectedDependents())
+ .flatMap(Unit::effectedDependents)
.collect(toList());
state.debug(DBG_GEN, "compileAndLoad %s -- deps: %s success: %s\n",
ins, newDependencies, success);
@@ -711,7 +711,7 @@
// all classes that could not be directly loaded (because they
// are new) have been redefined, and no new dependnencies were
// identified
- ins.stream().forEach(u -> u.finish());
+ ins.stream().forEach(Unit::finish);
return ins;
}
}