lukaszlenart opened a new pull request, #1879: URL: https://github.com/apache/struts/pull/1879
Backport of [#1874](https://github.com/apache/struts/pull/1874) to the 6.x line. `NO_CONVERSION_POSSIBLE` is an ordinary `String` constant, so `CollectionConverter`'s `!NO_CONVERSION_POSSIBLE.equals(convertedValue)` guard also matched a *successfully* converted element whose own text happens to be `"ognl.NoConversionPossible"` — and silently dropped it. Only the constant instance itself signals a failed conversion, so the comparison is now by identity. Verified affected on 6.x before fixing: `testElementWhoseTextEqualsTheMarkerIsKept` fails on `support/struts-6-x-x` with `expected:<[alpha, ognl.NoConversionPossible, omega]> but was:<[alpha, omega]>`. Note on the fixture, because it is easy to get wrong: the test value is built at runtime with `new String(...toCharArray())` and guarded by `assertNotSame`. A String *literal* is interned to the very same instance as the constant, so a literal-based test would pass vacuously even against the unfixed code. No request-derived parameter is ever that instance — a servlet container builds parameter values from the request bytes. The companion test pins that the guard still works: a genuinely unconvertible element is still dropped. Full `core` suite green: 2719 tests, 0 failures. Fixes [WW-5701](https://issues.apache.org/jira/browse/WW-5701) 🤖 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]
