[
https://issues.apache.org/jira/browse/WICKET-5359?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sven Meier resolved WICKET-5359.
--------------------------------
Resolution: Fixed
Assignee: Sven Meier
The locale seems always to be non-null, so we can just use #equals() on it
> org.apache.wicket.util.string.StringValue#equals broken
> -------------------------------------------------------
>
> Key: WICKET-5359
> URL: https://issues.apache.org/jira/browse/WICKET-5359
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 6.10.0
> Reporter: Jonas
> Assignee: Sven Meier
> Priority: Minor
>
> The #equals implementation for org.apache.wicket.util.string.StringValue is
> broken. The following throws an exception instead of just printing 'false':
> StringValue val = StringValue.valueOf("bla", Locale.FRANCE);
> StringValue val2 = StringValue.valueOf("bla", Locale.CANADA);
> System.out.println(val.equals(val2));
> This part of #equals
> Objects.isEqual(locale, stringValue.locale)
> should probably be replaced with something like
> (locale == stringValue.locale || (locale != null &&
> locale.equals(stringValue.locale))
> -> Objects.isEqual is not suitable to determine equality of Locale
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira