This is an automated email from the ASF dual-hosted git repository. lukaszlenart pushed a commit to branch WW-5540-localized-text-provider-caching in repository https://gitbox.apache.org/repos/asf/struts.git
commit 77bdf23b4875e446f91016024e25ce21f137db8f Author: Lukasz Lenart <[email protected]> AuthorDate: Thu Jul 23 13:07:59 2026 +0200 WW-5540 docs: refine Task 1 plan (deprecate/delegate + reload-on-entry) Co-Authored-By: Claude Opus 4.8 <[email protected]> --- .../plans/2026-07-23-WW-5540-localized-text-provider-caching.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/superpowers/plans/2026-07-23-WW-5540-localized-text-provider-caching.md b/docs/superpowers/plans/2026-07-23-WW-5540-localized-text-provider-caching.md index f6fbc0bcd..8d524519e 100644 --- a/docs/superpowers/plans/2026-07-23-WW-5540-localized-text-provider-caching.md +++ b/docs/superpowers/plans/2026-07-23-WW-5540-localized-text-provider-caching.md @@ -187,15 +187,21 @@ Replace the entire body of the existing `findMessage` (currently at `AbstractLoc * candidate whose formatted value is the literal {@code "null"} no longer causes the search to * continue deeper in the same hierarchy; this affects only the pathological case of the same key * redefined at multiple hierarchy levels with the shallow value formatting to {@code "null"}. + * The bundle-reload check is now triggered once on entry (when reload mode is enabled) rather than + * lazily per bundle probe, preserving the reload side effect that the previous {@code getMessage}-per-probe + * walk provided. */ @Deprecated protected String findMessage(Class<?> clazz, String key, String indexedKey, Locale locale, Object[] args, Set<String> checked, ValueStack valueStack) { + reloadBundles(valueStack != null ? valueStack.getContext() : null); String rawPattern = findMessageRaw(clazz, key, indexedKey, locale, checked); return rawPattern != null ? formatMessage(rawPattern, locale, valueStack, args) : null; } ``` +(The reload-on-entry preserves the side effect that the old `getMessage`-per-probe walk carried, so both the deprecated external-caller path and the Task-1 intermediate state — where `findText` still calls `findMessage` — keep triggering reload. The final cached path added in Task 2 relies instead on the reload hoisted to the top of `findText`.) + - [ ] **Step 4: Compile** Run: `mvn -q test-compile -DskipAssembly -pl core`
