8223553: Fix code constructs that do not compile with the Eclipse Java Compiler
Reviewed-by: smarks, dfuchs
This commit is contained in:
parent
4dd6b687ef
commit
fd67f8ee69
src
java.base/share/classes/java/lang/invoke
java.management/share/classes/java/lang/management
java.net.http/share/classes/jdk/internal/net/http
@ -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.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -872,12 +872,13 @@ public class ManagementFactory {
|
||||
public static Set<Class<? extends PlatformManagedObject>>
|
||||
getPlatformManagementInterfaces()
|
||||
{
|
||||
return platformComponents()
|
||||
// local variable required here; see JDK-8223553
|
||||
Stream<Class<? extends PlatformManagedObject>> pmos = platformComponents()
|
||||
.stream()
|
||||
.flatMap(pc -> pc.mbeanInterfaces().stream())
|
||||
.filter(clazz -> PlatformManagedObject.class.isAssignableFrom(clazz))
|
||||
.map(clazz -> clazz.asSubclass(PlatformManagedObject.class))
|
||||
.collect(Collectors.toSet());
|
||||
.map(clazz -> clazz.asSubclass(PlatformManagedObject.class));
|
||||
return pmos.collect(Collectors.toSet());
|
||||
}
|
||||
|
||||
private static final String NOTIF_EMITTER =
|
||||
|
@ -26,14 +26,15 @@
|
||||
package jdk.internal.net.http;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.function.Function;
|
||||
import java.net.http.HttpClient;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
import jdk.internal.net.http.common.Logger;
|
||||
import jdk.internal.net.http.common.MinimalFuture;
|
||||
import jdk.internal.net.http.common.Utils;
|
||||
|
||||
import static java.net.http.HttpClient.Version.HTTP_1_1;
|
||||
|
||||
/**
|
||||
@ -92,8 +93,10 @@ abstract class ExchangeImpl<T> {
|
||||
CompletableFuture<Http2Connection> c2f = c2.getConnectionFor(request, exchange);
|
||||
if (debug.on())
|
||||
debug.log("get: Trying to get HTTP/2 connection");
|
||||
return c2f.handle((h2c, t) -> createExchangeImpl(h2c, t, exchange, connection))
|
||||
.thenCompose(Function.identity());
|
||||
// local variable required here; see JDK-8223553
|
||||
CompletableFuture<CompletableFuture<? extends ExchangeImpl<U>>> fxi =
|
||||
c2f.handle((h2c, t) -> createExchangeImpl(h2c, t, exchange, connection));
|
||||
return fxi.thenCompose(x->x);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user