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

wicket-bean-validation: Bean validation PropertyValidator only works with direct field access

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 6.6.0
    • 6.7.0
    • wicket
    • None

    Description

      There's a substring indexing bug in the wicket-bean-validation module in org.apache.wicket.bean.validation.DefaultPropertyResolver that causes it to only work with direct field access and fail when field is missing and getter method should be used.

      The problem is on this line:

      String name = getter.getName().substring(3, 1).toLowerCase() + getter.getName().substring(4);

      Which should be:

      String name = getter.getName().substring(3, 4).toLowerCase() + getter.getName().substring(4);

      (or simply a single character access)

      Attachments

        Activity

          People

            ivaynberg Igor Vaynberg
            pekka Pekka Lund
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: