[jdk11u-dev] RFR: 8290886 [11u]: Backport of JDK-8266250 introduced test failures
Christoph Langer
clanger at openjdk.org
Fri Jul 22 15:53:08 UTC 2022
On Fri, 22 Jul 2022 14:23:01 GMT, George Adams <duke at openjdk.org> wrote:
> Tested locally and confirmed that both tests now pass again.
Overall looks good. I have a few suggestions to come closer to the original/avoid more changed lines. When you've updated the PR, I can run it through our nightlies.
test/jdk/java/net/httpclient/websocket/WebSocketProxyTest.java line 71:
> 69: import static java.net.http.HttpClient.newBuilder;
> 70: import static java.nio.charset.StandardCharsets.UTF_8;
> 71: import static java.util.stream.Collectors.toList;
not needed
test/jdk/java/net/httpclient/websocket/WebSocketProxyTest.java line 169:
> 167: return false;
> 168: }
> 169: public byte[] getBytes() {
I would place the `getBytes` method directly after the constructor
test/jdk/java/net/httpclient/websocket/WebSocketProxyTest.java line 173:
> 171: }
> 172: @Override
> 173: public int hashCode() {
let's keep the formatting as in the original.
test/jdk/java/net/httpclient/websocket/WebSocketProxyTest.java line 185:
> 183: }
> 184:
> 185: static List<Bytes> ofBytes(List<byte[]> bytes) {
Here you could rather write `return bytes.stream().map(WebSocketProxyTest.Bytes::new).collect(Collectors.toList());` to keep as close to the original as possible.
test/jdk/java/net/httpclient/websocket/WebSocketTest.java line 60:
> 58: import static java.net.http.WebSocket.NORMAL_CLOSURE;
> 59: import static java.nio.charset.StandardCharsets.UTF_8;
> 60: import static java.util.stream.Collectors.toList;
you don't need this import.
test/jdk/java/net/httpclient/websocket/WebSocketTest.java line 453:
> 451: return false;
> 452: }
> 453: public byte[] getBytes() {
as in the other file, move `getBytes()` behind the constructor
test/jdk/java/net/httpclient/websocket/WebSocketTest.java line 457:
> 455: }
> 456: @Override
> 457: public int hashCode() {
Keep original formatting.
test/jdk/java/net/httpclient/websocket/WebSocketTest.java line 469:
> 467: }
> 468:
> 469: static List<Bytes> ofBytes(List<byte[]> bytes) {
analogous to the other file: `return bytes.stream().map(WebSocketTest.Bytes::new).collect(Collectors.toList());`
-------------
Changes requested by clanger (Reviewer).
PR: https://git.openjdk.org/jdk11u-dev/pull/1265
More information about the jdk-updates-dev
mailing list