You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Christopher Schultz <ch...@christopherschultz.net> on 2017/11/01 20:00:36 UTC
Re: [tools 2.0] ValueParser.getStrings splits on comma?
Claude,
On 10/30/17 12:47 PM, Claude Brisson wrote:
>
>
> On 30/10/2017 17:25, Christopher Schultz wrote:
>> Claude,
>>
>> On 10/14/17 6:16 PM, Claude Brisson wrote:
>>> Chris, after you raised this issue I commited a fix in the tools
>>> trunk, see
>>>
>>> http://svn.apache.org/viewvc?view=revision&revision=1806598
>>>
>>> It sets the default delimiter to the empty string in the default
>>> tools.xml for the ParameterParser and fixes the code so that it does
>>> work. It's backward compatible since the empty string wasn't functional
>>> before. Sorry I didn't react on the list.
>> I think this may be a problem, though, since many may rely on the
>> previous-default which was "," and now the default is "".
>
> The default is still ',' for the non HTTP ValueVarser tool.
>
> Since the ParameterParser is *meant* for HTTP, the default was
> previously wrong, not only because HTTP uses key repetition but also, as
> you discovered, because it splits values containing comas.
>
> Since were releasing a major version, I think it's more reasonable to
> change it, while making it sure that we mention this point in the
> upgrading notes. Users willing to keep the former behavior will just
> have to set back the coma as separator in their tools.xml.
+1
The major version makes all the difference, even if the previous default
was very inappropriate. (Wearing my Bill Rowe hat right now ;)
Thanks,
-chris