[ https://issues.apache.org/jira/browse/WICKET-5906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14545523#comment-14545523 ]
ASF GitHub Bot commented on WICKET-5906: ---------------------------------------- Github user martin-g commented on a diff in the pull request: https://github.com/apache/wicket/pull/118#discussion_r30409143 --- Diff: wicket-core/src/main/java/org/apache/wicket/model/StringResourceModel.java --- @@ -275,110 +276,70 @@ public void setObject(String object) * not be obtained from resource bundles that are held relative to a particular component or * page. However, for application that use only global resources then this parameter may be * null. - * <p> - * The model parameter is also optional and only needs to be supplied if value substitutions are - * to take place on either the resource key or the actual resource strings. - * <p> - * The parameters parameter is also optional and is used for substitutions. * * @param resourceKey * The resource key for this string resource * @param component * The component that the resource is relative to - * @param model - * The model to use for property substitutions - * @param parameters - * The parameters to substitute using a Java MessageFormat object */ - public StringResourceModel(final String resourceKey, final Component component, - final IModel<?> model, final Object... parameters) + public StringResourceModel(final String resourceKey, final Component component) --- End diff -- Keep it. > Use default on missing resource does not work > --------------------------------------------- > > Key: WICKET-5906 > URL: https://issues.apache.org/jira/browse/WICKET-5906 > Project: Wicket > Issue Type: Bug > Components: wicket > Affects Versions: 7.0.0-M5 > Reporter: Martijn Dashorst > Fix For: 7.0.0-M6 > > > A regression since 6.19.0: when a StringResourceModel tries to lookup a key, > but that key doesn't exist in any of the resource bundles, it should use the > default if one is provided (and the setting is enabled in Wicket's > ResourceSettings), but currently throws an exception, or returns a string > with a warning that the resource could not be found. -- This message was sent by Atlassian JIRA (v6.3.4#6332)