You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by "info@flyingfischer.ch" <in...@flyingfischer.ch> on 2017/06/27 08:16:00 UTC

Calling empty Locale

Sorry for all these mails. One thing more that seems to have changed:

<2.5.11 calling empty locale "?request_local=" will result in locale en,
if I am not mistaken.

2.5.11 calling empty locale "?request_local=" will result in locale
object (not null) with property languageTag null

Both versions
Calling "?request_local=fggsgfj" will log a WARN message

com.opensymphony.xwork2.DefaultLocaleProvider - Cannot convert
[fighdhgduhg] to proper locale

And throw an

java.lang.IllegalArgumentException: Invalid locale format: fighdhgduhg

Shouldn't any empty locale be treated as invalid in the same way as
locale "fighdhgduhg"?

Markus

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: Calling empty Locale

Posted by "info@flyingfischer.ch" <in...@flyingfischer.ch>.
> Right... switching to LocaleUtils from commons wasn't that easy as I
> thought ;-) Can you register a ticket in JIRA and I will fix that :)
>
>
> Regards

Thanks Łukasz, for your ongoing great work! :-)

Markus

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: Calling empty Locale

Posted by Lukasz Lenart <lu...@apache.org>.
2017-06-27 10:16 GMT+02:00 info@flyingfischer.ch <in...@flyingfischer.ch>:
> Sorry for all these mails. One thing more that seems to have changed:

No problem, this is what I have been expecting when published a test
build - test and send as many emails as you can :)

> <2.5.11 calling empty locale "?request_local=" will result in locale en,
> if I am not mistaken.
>
> 2.5.11 calling empty locale "?request_local=" will result in locale
> object (not null) with property languageTag null
>
> Both versions
> Calling "?request_local=fggsgfj" will log a WARN message
>
> com.opensymphony.xwork2.DefaultLocaleProvider - Cannot convert
> [fighdhgduhg] to proper locale
>
> And throw an
>
> java.lang.IllegalArgumentException: Invalid locale format: fighdhgduhg
>
> Shouldn't any empty locale be treated as invalid in the same way as
> locale "fighdhgduhg"?

Right... switching to LocaleUtils from commons wasn't that easy as I
thought ;-) Can you register a ticket in JIRA and I will fix that :)


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org