|
5 | 5 | * you may not use this file except in compliance with the License.
|
6 | 6 | * You may obtain a copy of the License at
|
7 | 7 | *
|
8 |
| - * http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | + * https://www.apache.org/licenses/LICENSE-2.0 |
9 | 9 | *
|
10 | 10 | * Unless required by applicable law or agreed to in writing, software
|
11 | 11 | * distributed under the License is distributed on an "AS IS" BASIS,
|
|
14 | 14 | * limitations under the License.
|
15 | 15 | */
|
16 | 16 |
|
17 |
| -/* |
18 |
| - * Copyright 2023 the original author or authors. |
19 |
| - * |
20 |
| - * Licensed under the Apache License, Version 2.0 (the "License"); |
21 |
| - * you may not use this file except in compliance with the License. |
22 |
| - * You may obtain a copy of the License at |
23 |
| - * |
24 |
| - * http://www.apache.org/licenses/LICENSE-2.0 |
25 |
| - * |
26 |
| - * Unless required by applicable law or agreed to in writing, software |
27 |
| - * distributed under the License is distributed on an "AS IS" BASIS, |
28 |
| - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
29 |
| - * See the License for the specific language governing permissions and |
30 |
| - * limitations under the License. |
31 |
| - */ |
32 | 17 | package org.springframework.data.mongodb.core.aggregation;
|
33 | 18 |
|
34 | 19 | import org.springframework.data.mapping.context.MappingContext;
|
35 | 20 | import org.springframework.data.mongodb.core.convert.MappingMongoConverter;
|
36 | 21 | import org.springframework.data.mongodb.core.convert.NoOpDbRefResolver;
|
37 | 22 | import org.springframework.data.mongodb.core.convert.QueryMapper;
|
38 |
| -import org.springframework.data.mongodb.core.mapping.MongoMappingContext; |
39 | 23 | import org.springframework.data.mongodb.core.mapping.MongoPersistentEntity;
|
40 | 24 | import org.springframework.data.mongodb.core.mapping.MongoPersistentProperty;
|
41 | 25 | import org.springframework.data.mongodb.test.util.MongoTestMappingContext;
|
42 | 26 |
|
43 | 27 | /**
|
44 | 28 | * @author Christoph Strobl
|
45 |
| - * @since 2023/06 |
46 | 29 | */
|
47 | 30 | public final class AggregationTestUtils {
|
48 | 31 |
|
@@ -92,7 +75,9 @@ public T ctx() {
|
92 | 75 | return (T) Aggregation.DEFAULT_CONTEXT;
|
93 | 76 | }
|
94 | 77 |
|
95 |
| - MappingContext<? extends MongoPersistentEntity<?>, MongoPersistentProperty> ctx = mappingContext != null ? mappingContext : MongoTestMappingContext.newTestContext().init(); |
| 78 | + MappingContext<? extends MongoPersistentEntity<?>, MongoPersistentProperty> ctx = mappingContext != null |
| 79 | + ? mappingContext |
| 80 | + : MongoTestMappingContext.newTestContext().init(); |
96 | 81 | QueryMapper qm = queryMapper != null ? queryMapper
|
97 | 82 | : new QueryMapper(new MappingMongoConverter(NoOpDbRefResolver.INSTANCE, ctx));
|
98 | 83 | return (T) (strict ? new TypeBasedAggregationOperationContext(targetType, ctx, qm)
|
|
0 commit comments