Files
Lukasz Lenart a6570b769b WW-5668 Bound the localized-text provider caches and align request-locale resolution (#1821)
* WW-5668 docs: design spec for bounded i18n caches and request-locale resolution

Follow-up to WW-5540. Bound the AbstractLocalizedTextProvider caches via the
existing OgnlCache abstraction (configurable struts.i18n.cacheType/cacheMaxSize),
and add opt-in request-locale resolution consistency between Dispatcher and
I18nInterceptor (struts.locale.validateRequestLocale, default off).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WW-5668 docs: implementation plan for bounded i18n caches and request-locale resolution

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WW-5668 Add remove(key) to the OgnlCache abstraction

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WW-5668 Bound the localized-text provider caches with configurable size

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WW-5668 Fix reassignable-lock hazard and add volatile to i18n cache fields

synchronized (bundlesMap) locked on a monitor that rebuildI18nCaches()
can reassign; introduce a dedicated bundlesMapLock and lock on that
instead. Mark the five i18n cache fields volatile for safe publication
across the reassignment.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WW-5668 Add opt-in request-locale resolution consistency to Dispatcher

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WW-5668 Keep the localized-text caches transient so the provider stays serializable

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WW-5668 Add missing Javadoc and cache-rebuild coverage for i18n provider

Add the one-line Javadoc that sibling fields/setters carry to
validateRequestLocale and its @Inject setter in Dispatcher, and add two
tests covering StrutsLocalizedTextProvider's serialize/deserialize cache
rebuild and cacheType selection behaviour.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WW-5668 Pin explicit serialVersionUID on the localized-text providers

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WW-5668 Suppress false-positive Sonar S3077 on the thread-safe i18n caches

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WW-5668 Drop the unused throws Exception from the new Dispatcher locale tests

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-01 10:04:40 +02:00
..