DATACMNS-453 - Fix NPE in isPageableRepository() for Repositories without a findAll() method.
Added additional null check to isPagingRepository() to handle repository definitions that do not have a findAll method. Original pull request: #69.
This commit is contained in:
committed by
Thomas Darimont
parent
3131ffbc5f
commit
43d731f5ed
@@ -93,6 +93,11 @@ public abstract class AbstractRepositoryMetadata implements RepositoryMetadata {
|
||||
public boolean isPagingRepository() {
|
||||
|
||||
Method findAllMethod = getCrudMethods().getFindAllMethod();
|
||||
|
||||
if (findAllMethod == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return Arrays.asList(findAllMethod.getParameterTypes()).contains(Pageable.class);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user