File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/convert Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -444,6 +444,10 @@ else if (isDocument(value)) {
444444 }
445445 }
446446
447+ if (value == null ) {
448+ return null ;
449+ }
450+
447451 if (isNestedKeyword (value )) {
448452 return getMappedKeyword (new Keyword ((Bson ) value ), documentField .getPropertyEntity ());
449453 }
@@ -706,7 +710,7 @@ public Object convertId(@Nullable Object id, Class<?> targetType) {
706710 * @param candidate
707711 * @return
708712 */
709- protected boolean isNestedKeyword (Object candidate ) {
713+ protected boolean isNestedKeyword (@ Nullable Object candidate ) {
710714
711715 if (!(candidate instanceof Document )) {
712716 return false ;
@@ -754,6 +758,7 @@ protected boolean isKeyword(String candidate) {
754758 * @param value the actual value. Can be {@literal null}.
755759 * @return the potentially converted target value.
756760 */
761+ @ Nullable
757762 private Object applyFieldTargetTypeHintToValue (Field documentField , @ Nullable Object value ) {
758763
759764 if (value == null || documentField .getProperty () == null || !documentField .getProperty ().hasExplicitWriteTarget ()) {
You can’t perform that action at this time.
0 commit comments