Repository navigation
Cache ByteBuddy proxy classes for the class loader they are defined in - #1726
Merged
Merged
Conversation
…proxies A non-java.* type on the bootstrap class loader cannot get a private lookup, so its proxy fails on that regardless of the class loader it is cached for; the fallback to the application's class loader for it is gone. isInternalJavaType becomes isInJavaPackage, because java.sql and java.net.http are not internal. The rationale on resolveClassLoader(Class) moves to the commit message, and a test proxies java.sql.Timestamp, whose platform class loader is the reason the java.* check in resolveClassLoader(Class) has to stay. Generated-by: Claude Code (Claude Opus 5.5)
bitstorm
approved these changes
Oct 28, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1726 +/- ##
=========================================
Coverage 63.17% 63.17%
- Complexity 11556 11557 +1
=========================================
Files 1253 1253
Lines 48631 48635 +4
Branches 6844 6844
=========================================
+ Hits 30721 30725 +4
+ Misses 15193 15192 -1
- Partials 2717 2718 +1 🚀 New features to boost your workflow:
|
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.
Master counterpart of #1722, which fixes a regression of WICKET-7204 on 10.x. Master has the same
ByteBuddyProxyFactory, and the same failure.Since WICKET-7204 a ByteBuddy proxy class is defined with
UsingLookupin the class loader of the proxied type, but the proxy class cache was still keyed on the application's class resolver, i.e. the context class loader of the current thread. A thread with another context class loader missed the cache and defined the proxy class a second time in the same loader, which fails withLinkageError: attempted duplicate class definition.The cache is now keyed on the class loader the proxy is defined in. Types in a
java.*package keep their own path: they are renamed, defined in a wrapper loader and cached for the application's loader, becausejava.sqland other platform types have a loader that cannot see Wicket's interfaces.The commits are Andrea's two from #1722 plus a cleanup on top, cherry-picked unchanged. Squash on merge.
Generated-by: Claude Code (Claude Opus 5.5)