Raise the minimum Java version to 21. - #781
Open
blackwinter wants to merge 3 commits into
Open
Conversation
blackwinter
changed the base branch from
765-provideJava21ForwardCompatibility
to
master
July 13, 2026 09:05
blackwinter
force-pushed
the
765-raiseJavaVersionTo21
branch
from
July 14, 2026 11:09
c4eea5d to
214272a
Compare
See also Mockito documentation: [Explicitly setting up instrumentation for inline mocking (Java 21+)](https://javadoc.io/doc/org.mockito/mockito-core/latest/org.mockito/org/mockito/Mockito.html#0.3) -------- * JDK 21: WARNING: A Java agent has been loaded dynamically (.../byte-buddy-agent-1.12.19.jar) WARNING: If a serviceability tool is in use, please run with -XX:+EnableDynamicAgentLoading to hide this warning WARNING: If a serviceability tool is not in use, please run with -Djdk.instrument.traceUsage for more information WARNING: Dynamic loading of agents will be disallowed by default in a future release
Should actually be solved by either refactoring or `final`izing methods/classes. See also: https://bugs.openjdk.org/browse/JDK-8299995 -------- * JDK 21: - "warning: [this-escape] possible 'this' escape before subclass is fully initialized" - "warning: [this-escape] previous possible 'this' escape happens here via invocation"
…765) "This method was originally specified to test if a reference object has been cleared and enqueued but was never implemented to do this test. This method could be misused due to the inherent race condition or without an associated `ReferenceQueue`. An application relying on this method to release critical resources could cause serious performance issue. An application should use `ReferenceQueue` to reliably determine what reference objects that have been enqueued or `refersTo(null)` to determine if this reference object has been cleared." -------- * JDK 21: "warning: [deprecation] isEnqueued() in Reference has been deprecated"
blackwinter
force-pushed
the
765-raiseJavaVersionTo21
branch
from
July 14, 2026 11:17
214272a to
ddf031d
Compare
Member
Author
fsteeg
approved these changes
Jul 14, 2026
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.
Resolves #765.
finalizing methods/classes; see also JDK-8299995, introduced in JDK 21).Depends on both #779 and #780.