Emmanuel, all,

I need a short confirmation related to the definition of group conversions for the return value of an overriding method. IIUC, the following is legal:

Class Foo {
    public Bar getBar() {}
}

Class SubFoo extends Foo {

    @Valid
    @ConvertGroup(from=..., to=...)
    @Override
    public Bar getBar() {}
}

That is, SubFoo can define a group conversion for the return value as @Valid itself is added in SubFoo only. It would be illegal if @Valid was given in Foo, too.

I think that makes sense since LSP is not violated by the first variant, while it would in the second (a user of Foo wouldn't be aware of the applying conversions).

Right?

Thanks,

--Gunnar