Hi,

I agree with respect to parameter validation.

But shouldn't the validation interceptor also run last for return value validation, that is after all interceptors potentially modifying the return value? That way both contracts (pre- and postconditions) are enforced as closest to their clients (method implementation respectively method caller) as possible. Other interceptors generally couldn't rely on the correctness of parameters/return values.

The order would then look like that:

...
validate parameters
method call
...
validate return value

--Gunnar

Am 26.02.2012 19:28 schrieb "Emmanuel Bernard" <emmanuel@hibernate.org>: