|
17 | 17 |
|
18 | 18 | import java.lang.reflect.Constructor; |
19 | 19 | import java.lang.reflect.Method; |
20 | | -import java.util.ArrayList; |
21 | | -import java.util.Arrays; |
22 | | -import java.util.Collection; |
23 | | -import java.util.Collections; |
24 | | -import java.util.HashSet; |
25 | | -import java.util.LinkedHashMap; |
26 | | -import java.util.List; |
27 | | -import java.util.Map; |
28 | | -import java.util.Optional; |
29 | | -import java.util.Set; |
| 20 | +import java.util.*; |
30 | 21 | import java.util.function.Predicate; |
31 | 22 | import java.util.stream.Collectors; |
32 | 23 |
|
|
38 | 29 | import org.bson.conversions.Bson; |
39 | 30 | import org.bson.json.JsonReader; |
40 | 31 | import org.bson.types.ObjectId; |
41 | | - |
42 | 32 | import org.springframework.beans.BeansException; |
43 | 33 | import org.springframework.beans.factory.BeanClassLoaderAware; |
44 | 34 | import org.springframework.context.ApplicationContext; |
|
49 | 39 | import org.springframework.data.annotation.Reference; |
50 | 40 | import org.springframework.data.convert.CustomConversions; |
51 | 41 | import org.springframework.data.convert.TypeMapper; |
52 | | -import org.springframework.data.mapping.AccessOptions; |
53 | | -import org.springframework.data.mapping.Association; |
54 | | -import org.springframework.data.mapping.MappingException; |
55 | | -import org.springframework.data.mapping.PersistentEntity; |
56 | | -import org.springframework.data.mapping.PersistentProperty; |
57 | | -import org.springframework.data.mapping.PersistentPropertyAccessor; |
58 | | -import org.springframework.data.mapping.PersistentPropertyPath; |
59 | | -import org.springframework.data.mapping.PersistentPropertyPathAccessor; |
60 | | -import org.springframework.data.mapping.PreferredConstructor; |
61 | | -import org.springframework.data.mapping.PreferredConstructor.Parameter; |
| 42 | +import org.springframework.data.mapping.*; |
62 | 43 | import org.springframework.data.mapping.callback.EntityCallbacks; |
63 | 44 | import org.springframework.data.mapping.context.MappingContext; |
64 | 45 | import org.springframework.data.mapping.model.ConvertingPropertyAccessor; |
@@ -687,7 +668,7 @@ private void readAssociation(Association<MongoPersistentProperty> association, P |
687 | 668 | Object value = documentAccessor.get(property); |
688 | 669 |
|
689 | 670 | if (property.isDocumentReference() |
690 | | - || (!property.isDbReference() && property.findAnnotation(Reference.class) != null)) { |
| 671 | + || !property.isDbReference() && property.findAnnotation(Reference.class) != null) { |
691 | 672 |
|
692 | 673 | // quite unusual but sounds like worth having? |
693 | 674 |
|
@@ -1952,6 +1933,7 @@ class AssociationAwareMongoDbPropertyValueProvider extends MongoDbPropertyValueP |
1952 | 1933 | super(context, source, evaluator); |
1953 | 1934 | } |
1954 | 1935 |
|
| 1936 | + @Override |
1955 | 1937 | @Nullable |
1956 | 1938 | @SuppressWarnings("unchecked") |
1957 | 1939 | public <T> T getPropertyValue(MongoPersistentProperty property) { |
|
0 commit comments