Hi Łukasz,
After upgrading from 7.4.0 to 7.5.0, request parameters bound to String
properties are trimmed, not only values converted to numbers, dates and other
non-String types. WW-3666 and PR #2039 say String targets keep the value
untouched, so this looks unintended.
It seems to come from the early return in XWorkBasicConverter.convertValue: it
skips only a value whose class already matches the target type. A request
parameter arrives as String[], so it doesn’t match, each element is trimmed,
and the result is then converted to String.
Calling XWorkBasicConverter.convertValue directly:
String[]{" summer2026 "} -> String 7.4.0: " summer2026 " 7.5.0:
"summer2026"
" summer2026 " -> String unchanged on both
String[]{" 42 "} -> Integer 7.4.0: conversion error 7.5.0: 42 (the
intended change)
Where it hurts is a password field: a password that starts or ends with a space
stops matching after the upgrade.
Is this intended?
I can send the small test class if it helps.
Thanks,
Dan
--
[cid:[email protected]]
Daniel Piché, IDFusion Software
Solution Architect, Digital and Technology Solutions
Innovation & New Technology
1-204-292-2555
[email protected]<mailto:[email protected]>
Confidentiality Notice: This e-mail message (including any attachments) is
confidential and may be subject to privilege, including Crown privilege. All
rights to privilege are expressly claimed and not waived. It is strictly
prohibited to use, copying, distribution or disclosure this message or any
attachment, in whole or part, by anyone other than the intended recipient. If
you have received this message in error, please delete this message, and all
attachments, securely without making any copies and notify the sender
immediately.