[
https://issues.apache.org/jira/browse/WICKET-5811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14282538#comment-14282538
]
ASF subversion and git services commented on WICKET-5811:
---------------------------------------------------------
Commit 7acdaaf25cb3eaf5533c400bee9544b85169b5cf in wicket's branch
refs/heads/master from [~amorozov]
[ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=7acdaaf ]
WICKET-5811 Fix issue with infinite loop in
PropertyValidator#createUnresolvablePropertyMessage(FormComponent<>) in case or
trivial model (new Model<>(...));
(cherry picked from commit 5fe2682)
> Infinite loop issue in
> PropertyValidator#createUnresolvablePropertyMessage(FormComponent<>)
> --------------------------------------------------------------------------------------------
>
> Key: WICKET-5811
> URL: https://issues.apache.org/jira/browse/WICKET-5811
> Project: Wicket
> Issue Type: Bug
> Components: wicket-bean-validation
> Affects Versions: 6.18.0, 7.0.0-M4
> Environment: Windows Pro x64, Oracle JDK 7u72
> Reporter: Alexander Morozov
> Assignee: Igor Vaynberg
>
> In case of trivial model, attached to a FormComponent,
> PropertyValidator#createUnresolvablePropertyMessage(FormComponent<>) has no
> chances to find suitable model and falls into infinite loop.
> {code}
> IModel<?> model = component.getModel();
> // Code sadly copied over from DefaultPropertyResolver
> while (true)
> {
> if (model == null)
> {
> break;
> }
> if (model instanceof IPropertyReflectionAwareModel)
> {
> break;
> }
> if (model instanceof IWrapModel<?>)
> {
> model =
> ((IWrapModel<?>)model).getWrappedModel();
> continue;
> }
> // FIXME issue is here
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)