8223553: Fix code constructs that do not compile with the Eclipse Java Compiler

Reviewed-by: smarks, dfuchs
This commit is contained in:
Christoph Langer 2019-05-24 07:56:29 +01:00
parent 4dd6b687ef
commit fd67f8ee69
3 changed files with 17 additions and 11 deletions

View file

@ -4980,8 +4980,10 @@ assertEquals("boojum", (String) catTrace.invokeExact("boo", "jum"));
// Step 1C: determine loop return type.
// Step 1D: check other types.
final Class<?> loopReturnType = fini.stream().filter(Objects::nonNull).map(MethodHandle::type).
map(MethodType::returnType).findFirst().orElse(void.class);
// local variable required here; see JDK-8223553
Stream<Class<?>> cstream = fini.stream().filter(Objects::nonNull).map(MethodHandle::type)
.map(MethodType::returnType);
final Class<?> loopReturnType = cstream.findFirst().orElse(void.class);
loopChecks1cd(pred, fini, loopReturnType);
// Step 2: determine parameter lists.