Skip to content

Commit 585049b

Browse files
committed
Avoid obsolete inspection of DefaultedPageable.
The instance can never be null and thus we don't actually have to check for that.
1 parent a027727 commit 585049b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/RepositoryEntityController.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,7 @@ public CollectionModel<?> getCollectionResource(@QuerydslPredicate RootResourceI
198198
throw new ResourceNotFoundException();
199199
}
200200

201-
Iterable<?> results = pageable.getPageable() != null //
202-
? invoker.invokeFindAll(pageable.getPageable()) //
203-
: invoker.invokeFindAll(sort);
204-
201+
Iterable<?> results = invoker.invokeFindAll(pageable.getPageable());
205202
ResourceMetadata metadata = resourceInformation.getResourceMetadata();
206203
Optional<Link> baseLink = Optional.of(getDefaultSelfLink());
207204

0 commit comments

Comments
 (0)