Wicket
  1. Wicket
  2. WICKET-5102

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

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 6.6.0
    • Fix Version/s: 6.7.0
    • Component/s: wicket
    • Labels:
      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)

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Igor Vaynberg
            Reporter:
            Pekka Lund
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development