Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-5811

Infinite loop issue in PropertyValidator#createUnresolvablePropertyMessage(FormComponent<>)

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.18.0, 7.0.0-M4
    • Fix Version/s: 7.0.0-M5, 6.19.0
    • Component/s: wicket-bean-validation
    • Labels:
      None
    • Environment:
      Windows Pro x64, Oracle JDK 7u72

      Description

      In case of trivial model, attached to a FormComponent, PropertyValidator#createUnresolvablePropertyMessage(FormComponent<>) has no chances to find suitable model and falls into infinite loop.

      		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
      		}
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mgrigorov Martin Grigorov
                Reporter:
                amorozov Alexander Morozov
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: