Skip to content

Commit b126165

Browse files
Polishing.
Original Pull Request: #4255
1 parent 4df2c05 commit b126165

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
@@ -2358,8 +2358,9 @@ private CreateCollectionOptions getCreateCollectionOptions(Document document) {
23582358
* @param query the query document that specifies the criteria used to find a record.
23592359
* @param fields the document that specifies the fields to be returned.
23602360
* @param entityClass the parameterized type of the returned list.
2361-
* @return the converted object or null if none exists.
2361+
* @return the converted object or {@literal null} if none exists.
23622362
*/
2363+
@Nullable
23632364
protected <T> T doFindOne(String collectionName, Document query, Document fields, Class<T> entityClass) {
23642365
return doFindOne(collectionName, query, fields, CursorPreparer.NO_OP_PREPARER, entityClass);
23652366
}
@@ -2373,9 +2374,10 @@ protected <T> T doFindOne(String collectionName, Document query, Document fields
23732374
* @param fields the document that specifies the fields to be returned.
23742375
* @param entityClass the parameterized type of the returned list.
23752376
* @param preparer the preparer used to modify the cursor on execution.
2376-
* @return the converted object or null if none exists.
2377+
* @return the converted object or {@literal null} if none exists.
23772378
* @since 2.2
23782379
*/
2380+
@Nullable
23792381
@SuppressWarnings("ConstantConditions")
23802382
protected <T> T doFindOne(String collectionName, Document query, Document fields, CursorPreparer preparer,
23812383
Class<T> entityClass) {

0 commit comments

Comments
 (0)