[
https://issues.apache.org/jira/browse/WICKET-6614?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sven Meier resolved WICKET-6614.
--------------------------------
Resolution: Fixed
Assignee: Sven Meier
Fix Version/s: 9.0.0
8.2.0
7.11.0
Thanks [~trejkaz]
> AbstractRangeValidator looks up string with the wrong key if locale is Turkish
> ------------------------------------------------------------------------------
>
> Key: WICKET-6614
> URL: https://issues.apache.org/jira/browse/WICKET-6614
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 7.6.0
> Reporter: Trejkaz
> Assignee: Sven Meier
> Priority: Major
> Fix For: 7.11.0, 8.2.0, 9.0.0
>
> Attachments: WICKET-6614.patch, report.txt
>
>
> If you run your Wicket application on a system with Turkish locale, and
> you're using `StringValidator`, the string key you end up looking up is
> `"StringValidator.mınımum"`, when it should be `"StringValidator.minimum"`.
> This results in either an empty message or an exception, depending on the
> resource settings for the application.
> `AbstractRangeValidator` turns out to have this:
> {code}
> public static enum Mode {
> MINIMUM, MAXIMUM, RANGE, EXACT;
> public String getVariation()
> {
> return name().toLowerCase();
> }
> }
> {code}
> This `toLowerCase()` should probably be `toLowerCase(Locale.ROOT)`.
> I'd also recommend setting up forbidden-apis or similar to catch similar
> issues at build-time.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)