DATAMONGO-2570 - Change type of count variable to primitive.

Avoiding unintentional unboxing.

Original pull request: #871.
This commit is contained in:
Mehran Behnam
2020-06-18 13:00:06 +04:30
committed by Mark Paluch
parent a27939808b
commit a4ef46d641

View File

@@ -50,6 +50,7 @@ import com.mongodb.client.result.DeleteResult;
* @author Christoph Strobl
* @author Thomas Darimont
* @author Mark Paluch
* @author Mehran Behnam
*/
public class SimpleMongoRepository<T, ID> implements MongoRepository<T, ID> {
@@ -224,7 +225,7 @@ public class SimpleMongoRepository<T, ID> implements MongoRepository<T, ID> {
Assert.notNull(pageable, "Pageable must not be null!");
Long count = count();
long count = count();
List<T> list = findAll(new Query().with(pageable));
return new PageImpl<>(list, pageable, count);