Skip to content

Commit 7de9786

Browse files
committed
Fix missing return in BsonUtils.simpleToBsonValue(Date)
Closes: gh-5072 Signed-off-by: Andrey Litvitski <[email protected]>
1 parent a18556f commit 7de9786

File tree

1 file changed

+2
-1
lines changed
  • spring-data-mongodb/src/main/java/org/springframework/data/mongodb/util

1 file changed

+2
-1
lines changed

spring-data-mongodb/src/main/java/org/springframework/data/mongodb/util/BsonUtils.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
*
6464
* @author Christoph Strobl
6565
* @author Mark Paluch
66+
* @author Andrey Litvitski
6667
* @since 2.0
6768
*/
6869
public class BsonUtils {
@@ -393,7 +394,7 @@ public static BsonValue simpleToBsonValue(@Nullable Object source, CodecRegistry
393394
}
394395

395396
if (source instanceof Date date) {
396-
new BsonDateTime(date.getTime());
397+
return new BsonDateTime(date.getTime());
397398
}
398399

399400
try {

0 commit comments

Comments
 (0)