Commit Graph

2140 Commits

Author SHA1 Message Date
Mark Paluch
0ca3cc72e7 DATACMNS-1742 - After release cleanups. 2020-07-22 10:37:08 +02:00
Mark Paluch
a844661962 DATACMNS-1742 - Prepare next development iteration. 2020-07-22 10:37:05 +02:00
Mark Paluch
590baf9294 DATACMNS-1742 - Release version 2.3.2 (Neumann SR2). 2020-07-22 10:21:08 +02:00
Mark Paluch
e7d36e66ca DATACMNS-1742 - Prepare 2.3.2 (Neumann SR2). 2020-07-22 10:20:44 +02:00
Mark Paluch
2bdac251a5 DATACMNS-1742 - Updated changelog. 2020-07-22 10:20:22 +02:00
Mark Paluch
e8d2ae59b6 DATACMNS-1741 - Updated changelog. 2020-07-22 10:08:44 +02:00
Mark Paluch
eb8542196d DATACMNS-1740 - Updated changelog. 2020-07-22 09:44:30 +02:00
Mark Paluch
6f10d5a727 DATACMNS-1772 - Remove SpringDataAnnotationBeanNameGenerator and use BeanNameGenerator directly.
We now invoke BeanNameGenerator directly without additional indirections. Previously, SpringDataAnnotationBeanNameGenerator was calling BeanNameGenerator using null for BeanDefinitionRegistry which caused downstream null dereference.
2020-07-21 14:51:55 +02:00
Mark Paluch
fa01e15122 DATACMNS-1771 - Upgrade to Vavr 0.10.3. 2020-07-21 14:36:50 +02:00
Mark Paluch
af66d3489d DATACMNS-1768 - Polishing.
Reduce test visibility. Remove forEach detour through stream().
2020-07-14 09:47:18 +02:00
Mark Paluch
3d855fc338 DATACMNS-1768 - Reuse bean state in InstantiationAwarePropertyAccessor when setting multiple properties.
We now reuse the new bean in InstantiationAwarePropertyAccessor when setting properties. Previously, we used the initial bean state as the bean was held by a delegate PersistentPropertyAccessor which caused only the last set property to be visible.
2020-07-14 09:47:18 +02:00
Mark Paluch
3b73a4f901 DATACMNS-1767 - Polishing.
Reformat code. Use reflection for property access when running within a native image.

Original pull request: #456.
2020-07-13 14:26:08 +02:00
Christoph Strobl
7ed72ff41f DATACMNS-1767 - Disable ClassGeneratingEntityInstantiator when running native-image.
Always fall back to reflection when the system property for org.graalvm.nativeimage.imagecode is set.
This is required because on the fly code generation is not supported in this case.

Original pull request: #456.
2020-07-13 14:26:08 +02:00
Mark Paluch
f212e3e0ef DATACMNS-1758 - Revert optimizations from DATACMNS-1698.
We ensure that each EntityCallback retrieval operates on its own List to not share the retrieved callback list with other threads.
2020-07-09 14:15:59 +02:00
Mark Paluch
ff7a608cc7 DATACMNS-1725 - Updated changelog. 2020-06-25 12:00:17 +02:00
Mark Paluch
441609c4bf DATACMNS-1753 - Polishing.
Check for deferred types in ReactiveWrappers so that ReactiveWrapperConverters remains untouched as wrapper conversion from a reactive type into CompletableFuture is still possible from a ReactiveWrapperConverters perspective.

Original pull request: #450.
2020-06-25 10:48:15 +02:00
Gerrit Meier
895311c208 DATACMNS-1753 - Don't consider CompletableFuture as reactive type.
CompletableFuture use is permitted in imperative repositories so we should not use CompletableFuture as indicator to switch a repository implementation to a reactive one.

Original pull request: #450.
2020-06-25 10:47:25 +02:00
Mark Paluch
06184a3be5 DATACMNS-1750 - Polishing. 2020-06-22 15:48:16 +02:00
Mark Paluch
75f91975df DATACMNS-1750 - Refrain from inspecting Page contents if first item is null. 2020-06-22 15:48:15 +02:00
Oliver Drotbohm
7a7b1683ed DATACMNS-1743 - Polishing.
We now avoid identifier conversion in ReflectionrepositoryConverter if not necessary. Reestablish a couple of unit tests for DomainClassConverter that were disabled by accident.
2020-06-16 16:37:15 +02:00
Oliver Drotbohm
ba012ff25b DATACMNS-1743 - Fixed handling of failed aggregate lookup in DomainClassConverter.
We now fall back to null in case the repository lookup for the aggregate results in an absent value rather than returning the source unconverted.
2020-06-16 16:37:15 +02:00
Oliver Drotbohm
18d6e63ab0 DATACMNS-1745 - Polishing.
Made the reference to RepositoryInformation non-nullable from the RepositoryAnnotationTransactionAttributeSource (previously RepositoryInformationPreferring…). Adapted test cases accordingly.
2020-06-16 14:38:09 +02:00
Mark Paluch
bda90f037d DATACMNS-1745 - Refactor CustomAnnotationTransactionAttributeSource to use computeTransactionAttribute template method.
We now no longer duplicate Spring Framework code as AbstractFallbackTransactionAttributeSource exposes computeTransactionAttribute which we can use to override to determine TransactionAttribute from the repository interface.

Renamed CustomAnnotationTransactionAttributeSource to RepositoryInformationPreferringAnnotationTransactionAttributeSource to reflect the nature of our customization.
2020-06-16 14:38:03 +02:00
Oliver Drotbohm
fb944b3b98 DATACMNS-1743 - Fix lazy repository lookups in DomainClassConverter.
We now eagerly register DomainClassConverter as converter with the ConversionService in the web setup. We also refrain from explicitly registering the traget converters with the ConversionService as that might trigger a ConcurrentModificationException if called during an iteration over the converters in the first place. As DomainClassConverter registers itself for all ConvertiblePairs and delegates to the individual converters anyway.
2020-06-15 22:09:39 +02:00
Mark Paluch
ab9d3717f0 DATACMNS-1744 - Drop the use of the term white list. 2020-06-15 13:45:19 +02:00
Mark Paluch
9c94321657 DATACMNS-1724 - After release cleanups. 2020-06-10 14:29:28 +02:00
Mark Paluch
5d07e2e3d3 DATACMNS-1724 - Prepare next development iteration. 2020-06-10 14:29:25 +02:00
Mark Paluch
9d6a98f973 DATACMNS-1724 - Release version 2.3.1 (Neumann SR1). 2020-06-10 14:02:26 +02:00
Mark Paluch
a5ff62f9e1 DATACMNS-1724 - Prepare 2.3.1 (Neumann SR1). 2020-06-10 14:01:58 +02:00
Mark Paluch
eafc3edd2c DATACMNS-1724 - Updated changelog. 2020-06-10 14:01:36 +02:00
Mark Paluch
9688de52e5 DATACMNS-1712 - Updated changelog. 2020-06-10 12:29:56 +02:00
Mark Paluch
7b0c3cfcbf DATACMNS-1711 - Updated changelog. 2020-06-10 11:41:21 +02:00
Mark Paluch
7a887ea0d8 DATACMNS-1738 - Expose method to obtain the repository query method return type.
We now expose RepositoryMetadata.getReturnType(…) to obtain the declared method return type. While pure Java code can rely on Method.getReturnType(), suspended Kotlin methods (Coroutines) require additional lookups. This is because the Kotlin compiler messes around with the return type in the bytecode. It changes the return type to java.lang.Object while synthesizing an additional method argument:

interface MyCoroutineRepository : Repository<Person, String> {
	suspend fun suspendedQueryMethod(): Flow<Person>
}

compiles to

interface MyCoroutineRepository extends Repository<Person, String> {
	Object suspendedQueryMethod(Continuation<Flow<Person>> arg0);
}

Therefore, the triviality of obtaining a return type becomes an inspection of the actual method arguments.

Related ticket: https://jira.spring.io/browse/DATAMONGO-2562
2020-06-09 11:09:57 +02:00
Oliver Drotbohm
95f069c755 DATACMNS-1734 - Defer initialization of Repositories in DomainClassConverter.
DomainClassConverter now delays the initialization of the Repositories instances used to avoid the premature initialization of repository instances as that can cause deadlocks if the infrastructure backing the repositories is initialized on a separate thread.

Refactored nested converter classes to allow them to be static ones.

Related issues: spring-projects/spring-boot#16230, spring-projects/spring-framework#25131.
Original pull request: #445.
2020-05-29 09:47:15 +02:00
Mark Paluch
0d34687896 DATACMNS-1733 - Fix Javadoc for Range factory methods.
Range.open(…) is now correctly documented with exclusive bounds.
2020-05-27 10:15:03 +02:00
Mark Paluch
a8aa074328 DATACMNS-1735 - Polishing.
Use mutated object as guard for synchronization. Copy discovered callbacks to cached callbacks.

Reduce concurrency in unit test to reduce test load. Guard synchronization with timeouts.

Original pull request: #446.
2020-05-27 09:53:04 +02:00
mhyeon-lee
0e9544052c DATACMNS-1735 - Fix ConcurrencyModificationException in EntityCallbackDiscoverer.
We now guard modifications of the cached entity callbacks list with a synchronization block.

Original pull request: #446.
2020-05-27 09:31:10 +02:00
Mark Paluch
075aac6c12 DATACMNS-1706 - Polishing.
Improve Javadoc.

Original pull request: #437.
2020-05-26 09:12:14 +02:00
mhyeon-lee
31f821e7ff DATACMNS-1706 - Improve locking in PreferredConstructor#isConstructorParameter.
Switch property parameter cache from HashMap and external locks to ConcurrentHashMap to improve multi-threaded locking behavior during isConstructorParameter(…) initialization.

Original pull request: #437.
2020-05-26 09:12:14 +02:00
Mark Paluch
d36a8175d4 DATACMNS-1713 - After release cleanups. 2020-05-12 12:46:21 +02:00
Mark Paluch
37dca1e7bd DATACMNS-1713 - Prepare next development iteration. 2020-05-12 12:40:53 +02:00
Mark Paluch
a038ff5efc DATACMNS-1713 - Release version 2.3 GA (Neumann). 2020-05-12 12:28:23 +02:00
Mark Paluch
017c8d2fd2 DATACMNS-1713 - Prepare 2.3 GA (Neumann). 2020-05-12 12:27:59 +02:00
Mark Paluch
ee91f0ab4a DATACMNS-1713 - Updated changelog. 2020-05-12 12:27:44 +02:00
Mark Paluch
7de360cb7b DATACMNS-1676 - Polishing.
Encapsulate field and introduce getter for ConversionService. Add missing Override annotation. Add author tags. Minor cleanups.

Original pull request: #432.
2020-05-12 10:42:01 +02:00
Pavel Horal
f2f7886105 DATACMNS-1676 - Create shared conversion service for AuditableBeanWrapper.
Prevent performance penalty in creating conversion service each time a domain object is being persisted.

Original pull request: #432.
2020-05-12 10:41:27 +02:00
Cicio Flaviu
d9a1f65f05 DATACMNS-1720 - Fix Javadoc for CustomAnnotationTransactionAttributeSource to correctly describe JTA support.
Original pull request: #441.
2020-05-12 10:21:09 +02:00
John Gesimondo
796c86903c DATACMNS-1713 - Fix typo in doc.
Original pull request: #442.
2020-05-12 10:10:32 +02:00
Christoph Strobl
7c883acece DATACMNS-1721 - Lazily evaluate potential property matches in PropertyReferenceException.
Original pull request: #443.
2020-05-12 09:43:35 +02:00
Oliver Drotbohm
0d4b764c2c DATACMNS-1722 - More defensive lookup of XmlBeamHttpMessageConverter.
We now avoid a type reference to XmlBeamHttpMessageConverter in a field within SpringDataWebConfiguration to avoid a type reference to a potentially unresolvable type. This seems to have caused issues on certain JDK 14 builds [0].

[0] https://github.com/spring-projects/spring-framework/issues/25050
2020-05-12 09:03:17 +02:00