Skip to content

Commit 62d042a

Browse files
offajhy
andauthored
Java 25 CI support (#2403)
Add Java 25 CI build Workaround internal NPE on Azul 25 Ubuntu in testcase --------- Co-authored-by: Jonathan Hedley <jonathan@hedley.net>
1 parent b29ba35 commit 62d042a

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
matrix:
1111
os: [ubuntu-latest, windows-latest, macOS-latest]
1212
# choosing to run a reduced set of LTS, current, and next, to balance coverage and execution time
13-
java: [8, 17, 21]
13+
java: [8, 17, 21, 25]
1414
fail-fast: false
1515
name: Test JDK ${{ matrix.java }}, ${{ matrix.os }}
1616
steps:

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
### Improvements
66
* Added an instance method `Parser#unescape(String, boolean)` that unescapes HTML entities using the parser’s configuration (e.g. to support error tracking), complementing the existing static utility `Parser.unescapeEntities(String, boolean)`. [#2396](https://github.com/jhy/jsoup/pull/2396)
7+
* Build: added CI coverage for JDK 25 [#2403](https://github.com/jhy/jsoup/pull/2403)
78

89
### Bug Fixes
910
* Previously cached child Elements of an Element were not correctly invalidated in `Node#replaceWith(Node)`, which could lead to incorrect results when subsequently calling `Element#children()`. [#2391](https://github.com/jhy/jsoup/issues/2391)

src/test/java/org/jsoup/integration/ProxyTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,10 @@ static void assertAuthRequiredException(IOException e) {
144144
// in CONNECT (for the HTTPS url), URLConnection will throw the proxy connect as a Stringly typed IO exception - "Unable to tunnel through proxy. Proxy returns "HTTP/1.1 407 Proxy Authentication Required"". (Not a response code)
145145
// Alternatively, some platforms (?) will report: "No credentials provided"
146146
String err = e.getMessage();
147-
if (!(err.contains("407") || err.contains("No credentials provided"))) {
148-
System.err.println("Not a 407 exception?");
147+
if (!(err.contains("407") || err.contains("No credentials provided") || err.contains("exch.exchImpl"))) {
148+
// https://github.com/jhy/jsoup/pull/2403 - Ubuntu Azul 25 throws `Cannot invoke "jdk.internal.net.http.ExchangeImpl.cancel(java.io.IOException)" because "exch.exchImpl" is null` here but is just from cancelling the 407 req
149+
System.err.println("Not a 407 exception? " + e.getClass());
150+
e.printStackTrace(System.err);
149151
fail("Expected 407 Proxy Authentication Required, got: " + err);
150152
}
151153
}

0 commit comments

Comments
 (0)