lukaszlenart opened a new pull request, #1740: URL: https://github.com/apache/struts/pull/1740
## Summary Test-only cleanup of `ConfigParseUtilTest`, which was added in #1721 (the class-validation caching introduced for [WW-5630](https://issues.apache.org/jira/browse/WW-5630)). The production caching logic in `ConfigParseUtil` is **unchanged** — this only improves the test. - **Collapse redundancy**: 12 overlapping cache tests → 5 focused ones (single-loader caching, per-loader isolation incl. the same-`toString()` case, outer-size bound, inner-size bound, and the negative/not-cached case). - **Drop the ~80-entry literal**: the inner-cache size-bound test now generates synthetic class names in a loop bounded by the per-loader limit (read via the existing helper) instead of hardcoding a giant JDK class-name array. - **Remove unnecessary reflection**: the three behavioral tests assert via load counts only. Reflection is retained solely in the two size-bound tests, where Caffeine exposes no public seam for `estimatedSize()`. - **JUnit 3 → JUnit 4**: `@Test`/`@Before`/`@After` with static `org.junit.Assert.*`, matching the convention of the newest standalone unit tests in `core` (e.g. `ContainerHolderTest`, `NamedVariablePatternMatcherTest`). Net: 90 insertions / 183 deletions, 12 tests → 5. Fixes [WW-5630](https://issues.apache.org/jira/browse/WW-5630) test-quality follow-up. ## Test Plan - [x] `./mvnw -pl core clean test -Dtest=ConfigParseUtilTest` → `Tests run: 5, Failures: 0, Errors: 0, Skipped: 0` - [x] `./mvnw -pl core apache-rat:check` → BUILD SUCCESS (license headers) - [x] `core/src/main/java/org/apache/struts2/util/ConfigParseUtil.java` unchanged 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
