lukaszlenart opened a new pull request, #1741: URL: https://github.com/apache/struts/pull/1741
Port of #1740 to `support/struts-6-x-x`. Test-only cleanup of `ConfigParseUtilTest` (added on 6.x via #1736, cherry-pick of #1721): - **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 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 newer `core` unit tests (e.g. `NamedVariablePatternMatcherTest`). - Also reorders the caffeine imports in `ConfigParseUtil.java` to alphabetical (matching #1721 on main). Production caching logic is **unchanged**. ## 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 🤖 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]
