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

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        4d 9h 47m 1 Igor Vaynberg 20/Mar/13 01:49
        Igor Vaynberg made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 6.7.0 [ 12323964 ]
        Resolution Fixed [ 1 ]
        Igor Vaynberg made changes -
        Field Original Value New Value
        Assignee Igor Vaynberg [ ivaynberg ]
        Pekka Lund created 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