I found out that cross-parameter constraints were not supported by hibernate annotation processor. In the example provided, the processor was trying to compare Object or Object[] to the return type of the method, not to the parameters. I've implemented the support for cross-parameter constraints, added most of the checks and related test cases. The code is attached to the following pull request: https://github.com/hibernate/hibernate-validator/pull/455 |