[
https://issues.apache.org/jira/browse/WW-5819?focusedWorklogId=1050224&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1050224
]
ASF GitHub Bot logged work on WW-5819:
--------------------------------------
Author: ASF GitHub Bot
Created on: 26/Oct/26 11:45
Start Date: 26/Oct/26 11:45
Worklog Time Spent: 10m
Work Description: lukaszlenart opened a new pull request, #2062:
URL: https://github.com/apache/struts/pull/2062
Fixes [WW-5819](https://issues.apache.org/jira/browse/WW-5819)
## Summary
A validator param that cannot be converted to its property type used to be
left unset with no trace. For a range bound that silently switches the check
off:
```xml
<field-validator type="localdate">
<param name="min">01/02/2026</param> <!
Issue Time Tracking
-------------------
Worklog Id: (was: 1050224)
Remaining Estimate: 0h
Time Spent: 10m
> Log a validator param that fails type conversion instead of ignoring it
> silently
> --------------------------------------------------------------------------------
>
> Key: WW-5819
> URL: https://issues.apache.org/jira/browse/WW-5819
> Project: Struts 2
> Issue Type: Improvement
> Components: XML Validators
> Reporter: Lukasz Lenart
> Priority: Major
> Fix For: 7.5.0
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> h2. Problem
> {{DefaultValidatorFactory}} builds each validator through
> {{ObjectFactory.buildValidator}}, which sets the configured params with type
> conversion errors swallowed. A param that cannot be converted is left unset,
> and nothing is logged. For a range bound, that turns the check off without
> any trace:
> {code:xml}<field-validator type="localdate">
> <param name="min">01/02/2026</param> <!-- not an ISO date: min stays
> null -->
> </field-validator>
> {code}
> h2. Proposal
> Keep the current behaviour (the validator is still built and the param is
> still left unset), but log the swallowed conversion error. The message names
> the validator type, the param, the value and the cause:
> * WARN by default
> * ERROR in devMode
> h2. Scope
> A logging-only change with no behaviour change, so it is safe for 7.5.0.
> Failing the configuration instead is WW-5818 (8.0.0).
> h2. Tests
> * an unconvertible param on an XML-configured validator produces the log
> entry at the expected level, and the validator is still built
> * a valid param produces no entry
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)