Hibernate Validator
  1. Hibernate Validator
  2. HV-467

Complete handling of default group sequence re-definitions for method validation

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 5.x
    • Component/s: engine
    • Labels:
      None
    • Last commented by a user?:
      true

      Description

      In the context of method validation redefined default group sequences are currently considered only, when the evaluated bean type itself re-defines the default group sequences (so re-definitions up in the hierarchy are ignored).

      This behaviour should be aligned with the logic used for "standard" bean validation.

        Issue Links

          Activity

          Hide
          Hardy Ferentschik added a comment -

          So you are saying that there are no TCK tests which assert a given behaviour for this?

          Show
          Hardy Ferentschik added a comment - So you are saying that there are no TCK tests which assert a given behaviour for this?
          Hide
          Gunnar Morling added a comment -

          That's actually a good question. I just had a short look, there are tests for group sequence re-definitions from BV 1.0 (I think also covering re-definitions declared on supertypes) and there is MethodValidationTest#methodParameterValidationWithRedefinedDefaultGroupSequence and constructorParameterValidationWithRedefinedDefaultGroupSequence() for method constraints. I suppose there is indeed no test specifically for re-defined sequences on super-types with respect to method validation.

          Show
          Gunnar Morling added a comment - That's actually a good question. I just had a short look, there are tests for group sequence re-definitions from BV 1.0 (I think also covering re-definitions declared on supertypes) and there is MethodValidationTest#methodParameterValidationWithRedefinedDefaultGroupSequence and constructorParameterValidationWithRedefinedDefaultGroupSequence() for method constraints. I suppose there is indeed no test specifically for re-defined sequences on super-types with respect to method validation.
          Hide
          Hardy Ferentschik added a comment -

          I suppose there is indeed no test specifically for re-defined sequences on super-types with respect to method validation.

          Do we know how it is supposed to work though? Or is this a grey area of the spec?

          Show
          Hardy Ferentschik added a comment - I suppose there is indeed no test specifically for re-defined sequences on super-types with respect to method validation. Do we know how it is supposed to work though? Or is this a grey area of the spec?
          Hide
          Gunnar Morling added a comment -

          Out of my head, I'm not aware of any specific rules for default group sequences and method validation (I guess that's also why there are no specific tests for that, otherwise we would have noticed the unmarked spec wording).

          So I think the rules should be the same as for "normal" bean validation, which is why I hope the issue will be addressed when doing the unification (feeding method validation through the same routine as bean validation should apply the same handling of sequences). WDYT?

          Of course one can argue the entire topic of re-defined group sequences is a grey area

          Show
          Gunnar Morling added a comment - Out of my head, I'm not aware of any specific rules for default group sequences and method validation (I guess that's also why there are no specific tests for that, otherwise we would have noticed the unmarked spec wording). So I think the rules should be the same as for "normal" bean validation, which is why I hope the issue will be addressed when doing the unification (feeding method validation through the same routine as bean validation should apply the same handling of sequences). WDYT? Of course one can argue the entire topic of re-defined group sequences is a grey area
          Hide
          Hardy Ferentschik added a comment -

          So I think the rules should be the same as for "normal" bean validation, which is why I hope the issue will be addressed when doing the unification (feeding method validation through the same routine as bean validation should apply the same handling of sequences). WDYT?

          Sounds reaonsable

          Of course one can argue the entire topic of re-defined group sequences is a grey area

          Yeah.

          Show
          Hardy Ferentschik added a comment - So I think the rules should be the same as for "normal" bean validation, which is why I hope the issue will be addressed when doing the unification (feeding method validation through the same routine as bean validation should apply the same handling of sequences). WDYT? Sounds reaonsable Of course one can argue the entire topic of re-defined group sequences is a grey area Yeah.

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:

                Development