Commit Graph

1602 Commits

Author SHA1 Message Date
Mark Paluch
75f5f4af06 Updated changelog.
See #2354
2021-05-14 11:51:47 +02:00
Mark Paluch
2bb21181e8 Obtain merged annotation for annotation validation.
We now validate declared annotations by pre-processing these through AnnotatedElementUtils to ensure a proper comparison. Previously, we compared annotation in their declared form (AnnotatedElement.getAnnotations()) with merged annotations which could fail due to aliasing effects of merged annotations.

Closes #2368.
2021-05-05 12:05:40 +02:00
Mark Paluch
3940400541 Limit BeanWrapper's KotlinCopyUtil to Kotlin Data classes.
Previously, we tried to invoke the copy(…) method on all Kotlin classes whereas the copy(…) method is only specific to Kotlin data classes.

Original pull request: #390.
Closes #2358.
2021-04-21 09:28:53 +02:00
Mark Paluch
267d502652 Updated changelog.
See #2345
2021-04-14 14:40:01 +02:00
Mark Paluch
30e78bc303 Prepare 2.4.8 (2020.0.8).
See #2346
2021-04-14 11:32:47 +02:00
Mark Paluch
0679cd3a4e Updated changelog.
See #2346
2021-04-14 11:32:43 +02:00
Mark Paluch
2715095e65 Updated changelog.
See #2327
2021-04-14 11:17:41 +02:00
Mark Paluch
348ce54b6a Polishing.
Tweak wording.

Original pull request: #2352.
2021-04-13 15:21:04 +02:00
Jens Schauder
94fa775975 Adds a new snippet for is-new-state-detection.
This is intended for inclusion by other modules.

Closes #2352.
2021-04-13 15:21:04 +02:00
Mark Paluch
1f583bab3d Back-off in ResultProcessor if the result object is an instance of the target type.
We now do not attempt to convert the object if it is an instance of the declared target type.

Closes #2347.
2021-04-06 13:37:10 +02:00
Mark Paluch
7211f1359e Prepare 2.4.7 (2020.0.7).
See #2328
2021-03-31 18:19:19 +02:00
Mark Paluch
98bd1de84a Updated changelog.
See #2328
2021-03-31 18:19:14 +02:00
Mark Paluch
701c6039a1 Updated changelog.
See #2303
2021-03-31 17:26:06 +02:00
Mark Paluch
dca844dd6f Document effect of using AccessType(PROPERTY) in combination with Persistable.
Closes #2338
Original pull request #2339
2021-03-25 11:40:07 +01:00
Mark Paluch
b6581ebd14 Fix Kotlin copy method assignability check.
We now resolve only the raw class when checking if a primary constructor argument is assignable to method parameters of the synthetic copy method.
Previously we used ResolvableType's assignability check which considered generic type arguments. As the type resolution between the KType and copy method type is not symmetric, the check only succeeded in cases where both types could be resolved to the same type/assignable type. Using projections or Any caused asymmetric resolution and therefor the assignability check returned non-assignable.

Closes #2324.
2021-03-22 10:06:47 +01:00
Mark Paluch
8b5f4674d2 Updated changelog.
See #2326
2021-03-17 11:31:30 +01:00
Mark Paluch
9b21241ebf Prepare 2.4.6 (2020.0.6).
See #2305
2021-03-17 10:53:43 +01:00
Mark Paluch
94fd0641a1 Updated changelog.
See #2305
2021-03-17 10:53:38 +01:00
Mark Paluch
f4699a7c08 Updated changelog.
See #2301
2021-03-17 10:35:12 +01:00
Mark Paluch
d43d5add66 Polishing.
Use ResolvableType for type assignability check when resolving Type from a KType.

See #2324.
2021-03-12 16:56:53 +01:00
Mark Paluch
eac1105177 Polishing.
Reduce test method visibility.

See #2324.
2021-03-12 11:30:01 +01:00
Mark Paluch
6a5812b3de Use primary copy method for Kotlin data classes.
We now resolve the copy method for Kotlin data classes that match the primary constructor. Previously, copy method resolution could find a secondary copy method as we didn't check for the primary constructor structure (parameter names and types).

Closes #2324.
2021-03-12 11:30:01 +01:00
Mark Paluch
aaf5858f49 Polishing.
Reformat code.

Original pull request: #2314.
Closes: #2313
2021-03-01 10:34:53 +01:00
Christoph Strobl
8f4befff83 Collect constructor type information via Constructor.getParameters().
This commit fixes an issue where we fail to detect all type arguments from a given constructor. calling getGenericParameterTypes in some cases does not include all Types, we now explicitly iterate over the parameters and extract the parameterized type that is used for creating the TypeInformation.

Closes: #2313
Original pull request: #2314.
2021-03-01 10:34:53 +01:00
Mark Paluch
5454b37870 Document primitive type properties when using Query by Example.
Closes #2308.
2021-03-01 10:27:43 +01:00
Christoph Strobl
8192e93830 Updated changelog.
See #2304
2021-02-18 11:37:45 +01:00
Christoph Strobl
9384de2785 Prepare 2.4.5 (2020.0.5).
See #2302
2021-02-18 10:58:49 +01:00
Christoph Strobl
45fde0bf2f Updated changelog.
See #2302
2021-02-18 10:58:42 +01:00
Christoph Strobl
4e8afe507e Updated changelog.
See #2272
2021-02-17 14:20:36 +01:00
Christoph Strobl
7bc3ab9a0e Prepare 2.4.4 (2020.0.4).
See #2271
2021-02-17 11:59:37 +01:00
Christoph Strobl
ad4e80ebc5 Updated changelog.
See #2271
2021-02-17 11:59:32 +01:00
Christoph Strobl
f33811ce8c Updated changelog.
See #2257
2021-02-17 11:34:21 +01:00
Christoph Strobl
197f2be570 Updated changelog.
See #2255
2021-02-17 10:58:23 +01:00
Christoph Strobl
08e408bea2 Use NativeDetector.inNativeImage() instead of manual property check.
Closes: #2298
Original pull request: #2299.
Relates to: spring-projects/spring-framework#25795
2021-02-17 09:14:24 +01:00
Jan Zeppenfeld
b615a20a39 Add test for Repositories verifying isPrimary flag.
See #1583.
Original pull request: #465.
2021-02-15 15:58:57 +01:00
Mark Paluch
180c640f54 Consider primary repository definition in Repositories when created Repositories using ApplicationContext.
Closes #1583.
Original pull request: #465.
2021-02-15 15:58:56 +01:00
Mark Paluch
8cdf602167 Improve guards to avoid potential ClassCastException.
We now guard Slice conversion against potential ClassCastException using the proper condition grouping. Previously, the conversion could happen if the query is a slice query while the source was not a Slice.

Resolves #2296.
2021-02-15 15:32:06 +01:00
Mark Paluch
a16ce61a36 Polishing.
Slightly tweak wording.

See #2283
Original pull request: #2285
2021-02-09 11:53:43 +01:00
Christoph Strobl
aa6f660508 Update auditing documentation.
Mention that even when only using the CreatedDate & LastModifiedDate annotations it is mandatory to enable auditing.
Add sample of using auditing metadata within an embedded entity.

Closes #2283
Original pull request: #2285
2021-02-09 11:53:43 +01:00
Mark Paluch
5fc665ae29 Add negative-caching in PreferredConstructor.isConstructorParameter(…).
We now cache the negative outcome of PreferredConstructor.isConstructorParameter(…) to avoid iterations and iterator allocations which roughly improves typical converter usage by roughly 32%.

Before:
Benchmark                                                               Mode  Cnt        Score        Error  Units
TypicalEntityReaderBenchmark.simpleEntityGeneratedConstructorAndField  thrpt   10  6848447,474 ± 554354,377  ops/s

After
Benchmark                                                               Mode  Cnt        Score         Error  Units
TypicalEntityReaderBenchmark.simpleEntityGeneratedConstructorAndField  thrpt   10  9071099,879 ± 1423166,087  ops/s

Closes #2295.
2021-02-09 11:44:28 +01:00
Mark Paluch
64e8ba54d3 Polishing.
Remove outdated section.

See #2288
2021-02-02 14:41:04 +01:00
Christoph Strobl
c537643e8d Document SpringDataJacksonModules in web support section.
Closes #2288
Original pull request: #2289.
2021-02-02 14:39:35 +01:00
Oliver Drotbohm
f83a2edb69 Upgrade to Servlet 4.0 to align with Spring Framework.
Also, tweak test case to avoid to refer to a field in a Spring class but rather use API to access the value. Changes in Spring Framework 5.3.4 require this as the internal structure of AbstractJackson2HttpMessageConverter changed to support custom ObjectMapper instances per type and media type.

Fixes GH-2284.
2021-01-26 22:56:57 +01:00
Valeriy.Vyrva
a097edb07d Convert Vavr Seq to list with asJava method.
asJava(…) creates a read-only view instead of copying elements into a new List.

Closes #2217
Original pull request: #287
2021-01-26 10:38:49 +01:00
Oliver Drotbohm
47ee922ac3 Avoid pre-computing base URI in PagedResourceAssemblerArgumentResolver.
We now avoid the pre-computation of the base URI in PagedResourceAssemblerArgumentResolver as the actual assembler will fall back to using the URI of the current request by default anyway. The latter makes sure that request parameters, that are contained in the original requests appear in links created. If a controller wants to deviate from that behavior, they can create a dedicated link themselves and hand that to the assembler explicitly.

Fixes GH-2173, GH-452.
2021-01-26 10:00:57 +01:00
Mark Paluch
8a1be49c04 Guard potential null dereference in recursive initialization calls.
We now assign the repository field before resolving the persistent entity through the mapping context to avoid a potential NPE caused by a getObject(…) invocation through an application event.

Closes #2068
2021-01-26 09:47:42 +01:00
Mark Paluch
42997ac704 Fix constructor resolution for Kotlin classes using unsigned types.
We now leniently skip parameter name resolution for types using unsigned types. The issue is caused by Kotlin's DefaultConstructorMarker that doesn't report a parameter name.

Closes #2215
2021-01-18 13:51:40 +01:00
Christoph Strobl
6970077335 Updated changelog.
See #2258
2021-01-13 15:49:43 +01:00
Christoph Strobl
0ae0c44d5c Prepare 2.4.3 (2020.0.3).
See #2259
2021-01-13 14:17:43 +01:00
Christoph Strobl
69c4022974 Updated changelog.
See #2259
2021-01-13 14:17:41 +01:00