Skip to content

Commit b6a3616

Browse files
authoredJan 28, 2025··
feat: support JDK 23 (#2064)
* feat: support JDK 23 * format * fix supported version in ci.yaml
1 parent 1e70d04 commit b6a3616

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed
 

Diff for: ‎.github/workflows/ci.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
strategy:
2626
fail-fast: false
2727
matrix:
28-
java: [8, 11, 17]
28+
java: [8, 11, 17, 23]
2929
steps:
3030
- uses: actions/checkout@v4
3131
- uses: actions/setup-java@v4
@@ -54,7 +54,7 @@ jobs:
5454
runs-on: ubuntu-latest
5555
strategy:
5656
matrix:
57-
java: [8, 11, 17]
57+
java: [8, 11, 17, 23]
5858
steps:
5959
- uses: actions/checkout@v4
6060
- uses: actions/setup-java@v4

Diff for: ‎google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpTransportTest.java

+10-7
Original file line numberDiff line numberDiff line change
@@ -203,14 +203,17 @@ public void testDisconnectShouldNotWaitToReadResponse() throws IOException {
203203
public void handle(HttpExchange httpExchange) throws IOException {
204204
byte[] response = httpExchange.getRequestURI().toString().getBytes();
205205
httpExchange.sendResponseHeaders(200, response.length);
206-
207-
// Sleep for longer than the test timeout
208-
try {
209-
Thread.sleep(100_000);
210-
} catch (InterruptedException e) {
211-
throw new IOException("interrupted", e);
212-
}
213206
try (OutputStream out = httpExchange.getResponseBody()) {
207+
byte[] firstByte = new byte[] {0x01};
208+
out.write(firstByte);
209+
out.flush();
210+
211+
// Sleep for longer than the test timeout
212+
try {
213+
Thread.sleep(100_000);
214+
} catch (InterruptedException e) {
215+
throw new IOException("interrupted", e);
216+
}
214217
out.write(response);
215218
}
216219
}

0 commit comments

Comments
 (0)
Please sign in to comment.