Skip to content

Commit 324a541

Browse files
Polishing.
Original Pull Request: #4255
1 parent 6b71d77 commit 324a541

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/MongoTemplate.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2347,8 +2347,9 @@ private CreateCollectionOptions getCreateCollectionOptions(Document document) {
23472347
* @param query the query document that specifies the criteria used to find a record.
23482348
* @param fields the document that specifies the fields to be returned.
23492349
* @param entityClass the parameterized type of the returned list.
2350-
* @return the converted object or null if none exists.
2350+
* @return the converted object or {@literal null} if none exists.
23512351
*/
2352+
@Nullable
23522353
protected <T> T doFindOne(String collectionName, Document query, Document fields, Class<T> entityClass) {
23532354
return doFindOne(collectionName, query, fields, CursorPreparer.NO_OP_PREPARER, entityClass);
23542355
}
@@ -2362,9 +2363,10 @@ protected <T> T doFindOne(String collectionName, Document query, Document fields
23622363
* @param fields the document that specifies the fields to be returned.
23632364
* @param entityClass the parameterized type of the returned list.
23642365
* @param preparer the preparer used to modify the cursor on execution.
2365-
* @return the converted object or null if none exists.
2366+
* @return the converted object or {@literal null} if none exists.
23662367
* @since 2.2
23672368
*/
2369+
@Nullable
23682370
@SuppressWarnings("ConstantConditions")
23692371
protected <T> T doFindOne(String collectionName, Document query, Document fields, CursorPreparer preparer,
23702372
Class<T> entityClass) {

0 commit comments

Comments
 (0)