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 2019/10/25 10:04: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=16959629#comment-16959629 ] 

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

Commit 0ba3ce015ae9f258246b92ac599a00481a26c37f in wicket's branch refs/heads/master from Andrea Del Bene
[ https://gitbox.apache.org/repos/asf?p=wicket.git;h=0ba3ce0 ]

WICKET-6708 Made lowercase conversion local insentive, as did for WICKET-6614


> 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-M1
>
>         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
(v8.3.4#803005)