Alexander Morozov created WICKET-5811:
-----------------------------------------
Summary: 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: 7.0.0-M4, 6.18.0
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)