Skip to content

Commit

Permalink
fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
erwan-serandour committed Jan 28, 2025
1 parent 9612ca4 commit a142f6a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions rules/S7186/java/rule.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

Spring Data Repository supports paging for queries, allowing you to return results in small, manageable chunks rather than retrieving an entire large result set.

The conventional approach to paginating data in Spring is to use the `Pageable` interface to control pagination and to store the query results into a `Page` or Slice.
If a query method returns a `Page` or Slice without taking a `Pageable` as an input, it likely employs a custom pagination scheme, which is inconsistent with Spring conventions.
The conventional approach to paginating data in Spring is to use the `Pageable` interface to control pagination and to store the query results into a `Page` or `Slice`.
If a query method in a `Repository` returns a `Page` or `Slice` without taking a `Pageable` as an input, it raises a runtime exception.

This rule raises an issue on query methods that return a `Page` or Slice without taking a `Pageable` as an input.
This rule raises an issue on query methods that return a `Page` or `Slice` without taking a `Pageable` as an input.

== How to fix it

Ensure that methods returning a `Page` or Slice include a `Pageable` parameter in their method signature.
Ensure that query methods returning a `Page` or `Slice` include a `Pageable` parameter in their method signature.

=== Code examples

Expand Down

0 comments on commit a142f6a

Please sign in to comment.