Menu

#53 Validation on Interfaces and JSR 303

v1.40
open
nobody
guard (4)
5
2013-01-25
2009-12-27
Chris Pheby
No

Hi Sebastian,

I have been using OVal a lot over the last few years to support design-by-contract type enforcement, particularly on methods. Recently I have been using OVal and JSR-303 together in the same codebases.

Please find the first cut of a patch for OVal that adds:

Please find attached a patch for the following changes in OVal:

* When the @Valid annotation is found within a guarded class, apply JSR 303 validation to the subject of the annotation
* If inspectInterfaces is enabled on the Guarded annotation, any validations specified on interfaces the class implements
are also to be applied. This is useful for applying design by contract at interface level.
* Checkstyle rules are updated for compatibility with current version of the checkstyle plugin

Welcome your feedback and hopefully this will be useful for incorporation into the framework.

Thanks Chris

Discussion

  • Chris Pheby

    Chris Pheby - 2009-12-27

    Patch including changes described

     
  • Chris Pheby

    Chris Pheby - 2010-06-09

    Revision of Patch for Current Trunk - DBC part

     
  • Chris Pheby

    Chris Pheby - 2010-06-09

    Revision of Patch for Current Trunk - JSR 303 part

     
  • Chris Pheby

    Chris Pheby - 2010-06-09

    Revised the patch to separate the dbc for interfaces and JSR 303 pieces into two separate patches which build with the current trunk. The JSR 303 patch also includes an Oval annotation as well as supporting @Valid from JSR 303. The Oval annotation allows target groups to be specified.