Skip to content

Commit

Permalink
change comment in test about other exception class ProtocolException …
Browse files Browse the repository at this point in the history
…in jdk17
  • Loading branch information
MBaesken committed Aug 7, 2024
1 parent f55652e commit 75c1361
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions test/jdk/java/net/httpclient/Response1xxTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,7 @@ public void testSecureHTTP2Unexpected101() throws Exception {
final HttpRequest request = HttpRequest.newBuilder(requestURI).build();
System.out.println("Issuing request to " + requestURI);
// we expect the request to fail because the server sent an unexpected 101
// to check - we get here an IOException not a ProtocalException (compared to 17 or 21)
//Assert.assertThrows(ProtocolException.class,
// Backport note: Later JDK versions (e.g. 17 or 21) throw a ProtocolException.
Assert.assertThrows(IOException.class,
() -> client.send(request, HttpResponse.BodyHandlers.ofString(StandardCharsets.UTF_8)));
}
Expand Down

0 comments on commit 75c1361

Please sign in to comment.