Avoid obsolete inspection of DefaultedPageable.

The instance can never be null and thus we don't actually have to check for that.

Fixes #2222
This commit is contained in:
Oliver Drotbohm
2023-02-21 14:12:55 +01:00
parent b65e0c9118
commit 6c4f57f31a

View File

@@ -194,10 +194,7 @@ class RepositoryEntityController extends AbstractRepositoryRestController implem
throw new ResourceNotFoundException();
}
Iterable<?> results = pageable.getPageable() != null //
? invoker.invokeFindAll(pageable.getPageable()) //
: invoker.invokeFindAll(sort);
Iterable<?> results = invoker.invokeFindAll(pageable.getPageable());
ResourceMetadata metadata = resourceInformation.getResourceMetadata();
Optional<Link> baseLink = Optional.of(getDefaultSelfLink());