Skip to content

Filter bridge methods from DefaultCrudMethods lookup #3401

@mp911de

Description

@mp911de

With the change spring-projects/spring-framework#35780 in Spring Framework, most specific method lookup depends on the Method[] order returned by Java reflection causing sometimes resolving the correct method and sometimes falling back to the overridden method in CrudRepository if a sub-interface overrides e.g. findAll(). In that case, if the earlier found method that is a bridge (Iterable RepositoryWithAllCrudMethodOverloaded.findAll()), then BridgeMethodResolver.findBridgedMethod(…) now resolves to CrudRepository.findAll() instead of List RepositoryWithAllCrudMethodOverloaded.findAll().

interface CrudRepository<T, ID> extends Repository<T, ID> {
…
	Iterable<T> findAll();
…
}

interface RepositoryWithAllCrudMethodOverloaded extends CrudRepository<Domain, Long> {

	@Override
	List<Domain> findAll();

}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions