Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The build fails on JDK 21 and 25 for two independent reasons. This PR fixes both and adds those JDKs to the PR build matrix so they stay green. The compiler target stays at Java 8, so the published artifacts do not change.
JDK 21 and 25:
PermittedUrlsCheckerTest. 15 tests fail withclass redefinition failed: attempted to change the class NestHost, NestMembers....@Mocked NetUtilsmakes JMockit 1.49 cascade-mock theInetAddressreturn type, and redefining that JDK class is rejected on 21+. The test now uses Mockito 4.11mockStatic, the last Mockito line that still runs on Java 8, with Byte Buddy 1.18.16 so it can instrument on JDK 25. Test names, data providers and expected exceptions are unchanged. The JMockit tests inswagger-parser-v3pass on 21 and 25 and are left as they are.JDK 25: javadoc.
maven-javadoc-pluginfailsswagger-parser-corewithUnexpected redirection for URL http://docs.oracle.com/javase/8/docs/api/element-list, because Oracle now redirects that URL and javadoc 25 treats it as an error. The hardcoded<link>is removed, so the plugin uses its bundled Java 8 package list. Generated docs still link tohttps://docs.oracle.com/javase/8/docs/api/, and the build no longer needs network access for it.CI.
maven-pulls.ymlmatrix goes from[ 11, 17 ]to[ 11, 17, 21, 25 ].maven.yml(push and snapshot deploy) is untouched.Fixes: #2095
Type of Change
Checklist
Screenshots / Additional Context
mvn --no-transfer-progress -B install(the PR workflow command), run locally on each JDK:On current
master, 21 fails inswagger-parser-safe-url-resolverand 25 fails in bothswagger-parser-coreandswagger-parser-safe-url-resolver.