You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2018/12/06 20:32:00 UTC

[jira] [Commented] (WICKET-6614) AbstractRangeValidator looks up string with the wrong key if locale is Turkish

    [ https://issues.apache.org/jira/browse/WICKET-6614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16711996#comment-16711996 ] 

ASF subversion and git services commented on WICKET-6614:
---------------------------------------------------------

Commit 138abdd0ecb05947d42385db22982f3a42439e16 in wicket's branch refs/heads/WICKET-6563 from [~svenmeier]
[ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=138abdd ]

WICKET-6614 upperCase and lowerCase with root locale

for locale insentive conversion


> 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)