Removed the deprecated implementation of ResourceLoaderAware in favor of BeanClassLoaderAware. Removed deprecated ProjectionFactory.getInputProperties() in favor of ….getProjectionInformation(). Removed the Java conditional to add a MethodInterceptor for default methods. Adapted test cases.
Updated Sonargraph architecture description. Polished imports in domain package to avoid unnecessary imports (mostly due to Javadoc references).
Removed manually declared constructor in ExampleMatcherAccessor in favor of Lombok's @RequiredArgsConstructor. Removed deprecations in type information subsystem. Moved to different way of class loading to avoid null pointer warnings in ReflectionUtils.
Introduced new ExampleMatcherAccessor in data.support in favor of the now deprecated one in data.repository.core to avoid a dependency into the repositories subsystem to work with examples in general.
Added Degraph based test in order to avoid future cyclic package dependency violations.
Original pull request: #230.
Related ticket: DATAMONGO-1721.
We now use a marker interface to store cache hits for conversion targets without requesting a conversion target in the conversion query. The dedicated marker type has an individual cache view and does not interfere with other types.
Previously we used Object as cache key which caused false positives due to assignability checks. If an earlier conversion query with a requested target type yielded a hit (e.g. negative hit), subsequent queries without a target type received the same answer. This might happen although the non-cached answer would return a different result.
Move MappingException from o.s.d.mapping.model to o.s.d.mapping package and use it for getRequired* methods in MappingContext instead of throwing IllegalArgumentException. Further on we’ve consolidated usage of IllegalArgumentException and IllegalStateException. Along that IllegalMappingException was removed in favor or MappingException.
BasicPersistentEntity now looks up all properties by annotation instead of just returning the first one found. We’ve kept the original methods behavior and updated the comment as well as introduced getPersistentProperties returning all matching properties.
Refactored type alias detection invocation in BasicPersistentEntity into separate method and avoid the factory method Alias.ofOptional(…) so that it can be removed.
For repository query methods with a dynamic projection parameter, the ResultProcessor is recreated with the type handed to the method. This results in recreation of the ProjectingConverter, which previously recreated a DefaultConversionService instance (for fallback conversions), which is rather expensive due to the reflection lookups checking for the presence of libraries on the classpath.
This is now avoided by using copying methods that reuse the initially created DefaultConversionService.
We now override ClassPathScanningCandidateComponentProvider's getRegistry() to make sure custom conditions on repository candidates can use the currently available BeanDefinitionRegistry in their implementations. To achieve that we forward the BeanDefinitionRegistry at hand through the configuration infrastructure (both XML and annotation side of things).
Switched to use Optional<Object> to make nullability explicit. Keep the original ….convert(…) method around as deprecated default method so that clients can be migrated gradually.
We now use specified date formats for converting various date types to Strings and comparing them.
Before, in some cases toString() was used which strips trailing zeros, causing sporadic failures.
JDK9 changed the behaviour of Date related toString methods, making tests fail all the time.
Therefore this fix is required for executing tests with JDK9.
Original pull request: #228.
ObjectInstantiator needs to be declared public as otherwise loading the implementation class fails as it doesn't have access to the (package) private interface in a different classloader.
Changed RepositoryConfiguration to return Streamable over Iterable. A couple of code reorganizations, suppression of raw type. Turned abstract helper classes into interfaces where possible. A couple of typos in JavaDoc.
Original pull request: #222.
We now use RepositoryComposition as backing implementation for repository method calls to implementations. We now scan for repository fragments during the repository configuration phase. Fragment implementation candidates derive from the repository interface declaration, specifically the declared interfaces and their order. We scan the class path during fragment scan for each interface and add discovered fragments to the repository composition. The name of the implementation is derived from the simple name of the interface and the implementation suffix. Qualified fragments are top-level interface declarations that are not annotated with NoRepositoryBean. Inherited interfaces are not considered as fragment candidates.
We create a RepositoryComposition from the discovered fragments in the order of interface declaration in the repository interface and supply the composition to the actual repository creation.
Original pull request: #222.
We now accept Publisher<T> instead of Mono<T> in findById(…) and existsById(…). Users of a ReactiveStreams-based framework are no longer required to perform Publisher to Mono-adoption themselves but can pass a Publisher directly. Both methods use the first emitted value to issue their queries. Additional values are not consumed from the stream.
Original Pull Request: #226