WW-5614 Remove cache for ProxyUtil#ultimateTargetClass#1578
Merged
Conversation
|
lukaszlenart
approved these changes
Feb 12, 2026
5 tasks
lukaszlenart
added a commit
that referenced
this pull request
Feb 21, 2026
Remove targetClassCache from StrutsProxyService to avoid memory leak (object-keyed cache reintroduced from PR #1578). Change default proxy cache type to wtlfu to align with all other caches. Switch deprecated ProxyUtil static caches to BASIC to remove hard Caffeine dependency. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
lukaszlenart
added a commit
that referenced
this pull request
Feb 21, 2026
) * feat(proxy): WW-5514 add StrutsProxyService for proxy detection and resolution Introduces a configurable ProxyService interface and StrutsProxyService implementation for detecting and resolving Spring AOP/Hibernate proxies. Key changes: - Add ProxyService interface with isProxy, ultimateTargetClass, and resolveTargetMember methods - Add StrutsProxyService implementation using configurable caches - Add ProxyCacheFactory and StrutsProxyCacheFactory for cache management - Integrate ProxyService into ChainingInterceptor, ParametersInterceptor, and SecurityMemberAccess - Add integration test with Spring AOP proxied action chaining - Add configuration constants for proxy cache type and size The StrutsProxyService correctly handles: - Spring CGLIB proxies (class-based) - Spring JDK dynamic proxies (interface-based) - Hibernate entity proxies - Member resolution for allowlist checking Fixes WW-5514 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * test(proxy): WW-5514 add ProxyService integration tests for Spring proxies Add integration tests to SpringProxyUtilTest that verify the new ProxyService works correctly with real Spring AOP proxies, alongside the existing deprecated ProxyUtil tests. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(proxy): WW-5514 address PR review feedback for proxy caches Remove targetClassCache from StrutsProxyService to avoid memory leak (object-keyed cache reintroduced from PR #1578). Change default proxy cache type to wtlfu to align with all other caches. Switch deprecated ProxyUtil static caches to BASIC to remove hard Caffeine dependency. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Cursor <cursoragent@cursor.com>
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.



WW-5614
Fixes potential excessive memory usage caused by this cache, first reported here.
It would be better to retain the cache (for performance) and make the keys weak references (to optimise memory usage) but I will await the merge of #1573 first as the changes will likely conflict.