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

Alexander Morozov commented on WICKET-5811:
-------------------------------------------

PR https://github.com/apache/wicket/pull/83 and 
https://github.com/apache/wicket/pull/84


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

Reply via email to