I'm trying to get repository method argument and return type validation. To eliminate any repetitive need to write explicit validation code on them.
The various methods of JpaRepository are overridden in a subinterface to enforce this behavior.
There seems to be a dependency on the way the code is built. Because depending on what did the build (Maven or Intellij) and in what order (Maven after Intellij or inverse) the validation works, sometimes work, is totally ignored or triggers an error that no validator was found for Iterable<S>.
Initially the annotation @NotEmpty was used. Replacing it by @NotNull@Size(min=1) alas did not solve the problem.
I have tried many configurations, but never can I seem to get a consistent behavior. Hence this bug.
I'm including the various concerned files into this ticket.
Btw, let me congratulate the people who had the stroke of genius of "programming-repositories-by-intention" !
The CI environment runs the very same test code, in separate VM's, against different databases. Sometimes the validation is applied. Sometimes it isn't. Rerunning with the same code might fail different jobs. While previously failing jobs might succeed