Files
spring-data-commons/src/main/java/org/springframework
Mark Paluch 142c9ddb5c DATACMNS-1289 - Allow fragment creation only from implementations that implement their declared class.
We now check that fragment implementations created via RepositoryFragment.implemented(Class<T>, T) are a subtype of the given class. This assertion raises an exception that prevents errors during runtime.

This change addresses an issue with customized intermediate base repositories in combination with ambiguous naming of implementations. Method invocations fail if a repository derives from a customized base repository interface that implements e.g. CrudRepository and there's an implementation matching the base repository name followed by the implementation suffix. We assume in that case, the implementation contains implementations of the methods declared in the customized base interface.

Original pull request: #280.
2018-04-06 17:46:04 +02:00
..