Commit Graph

1789 Commits

Author SHA1 Message Date
Oliver Drotbohm 7d28e65b77 DATACMNS-1456 - ExtensionAwareEvaluationContextProvider now uses a ConcurrentHashMap as cache. 2018-12-21 15:18:01 +01:00
Oliver Drotbohm 3623e1889b DATACMNS-1455 - HateoasPageableHandlerMethodArgumentResolver handles Pageable.unpaged() coprrectly.
Pageable.unpaged() is now effectively handled like a null value given in the 1.x branch.
2018-12-21 09:59:51 +01:00
Oliver Drotbohm e9d75c6cd9 DATACMNS-1453 - Polishing.
Renamed test methods and made use of AssertJ assertions to verify exceptions being thrown.

Original pull request: #328.
2018-12-20 15:55:36 +01:00
Francisco Soler 8ad81e8310 DATACMNS-1453 - Fixed wrong assertion in AuditingBeanDefinitionRegistrarSupport.
Original pull request: #328.
2018-12-20 15:55:36 +01:00
Christoph Strobl f132bf8af3 DATACMNS-1441 - Updated changelog. 2018-12-11 11:43:18 +01:00
Oliver Drotbohm 296d105e19 DATACMNS-1443 - Fixed Querydsl web data binding for blank strings.
We now use StringUtils.hasLength(…) in the check whether to drop request elements from binding instead of ….hasText(…) as the latter drops blank strings so that's impossible to search for properties that contain a blank.
2018-12-10 16:57:39 +01:00
Oliver Drotbohm 9414b49023 DATACMNS-1346 - Polishing.
License headers, Javadoc, @since tags.

Original pull request: #299.
2018-12-07 15:48:16 +01:00
Sebastien Deleuze e48bcf6e84 DATACMNS-1346 - Add a findByIdOrNull(…) extension to CrudRepository.
In Kotlin, it is idiomatic to deal with return value that could have or not a result with nullable types since they are natively supported by the language. This commit adds CrudRepository.findByIdOrNull(…) variant to CrudRepository#findById that returns T? instead of Optional<T>.

Original pull request: #299.
2018-12-07 15:48:13 +01:00
Oliver Drotbohm 0a85e44dc9 DATACMNS-1438 - Integration test showing that auditing is working in general. 2018-12-06 17:16:16 +01:00
Oliver Drotbohm 3e8ea31cf4 DATACMNS-1436 - Removed explicit addon declaration for Oracle JDK from Travis config. 2018-12-04 14:45:59 +01:00
Oliver Drotbohm 82a4c33d03 DATACMNS-993 - Polishing.
Removed System.out in ShadowingClassLoader.
2018-12-04 14:17:22 +01:00
Oliver Drotbohm 235a2b42f0 DATACMNS-1435 - Fixed Vavr Map component and value type detection. 2018-12-04 14:16:02 +01:00
Mark Paluch 62148927db DATACMNS-1414 - After release cleanups. 2018-11-27 14:23:35 +01:00
Mark Paluch f0d539fad1 DATACMNS-1414 - Prepare next development iteration. 2018-11-27 14:23:33 +01:00
Mark Paluch 508772dc4b DATACMNS-1414 - Release version 2.1.3 (Lovelace SR3). 2.1.3.RELEASE 2018-11-27 13:43:24 +01:00
Mark Paluch d5b7ded2c5 DATACMNS-1414 - Prepare 2.1.3 (Lovelace SR3). 2018-11-27 13:42:17 +01:00
Mark Paluch 66af2439fb DATACMNS-1414 - Updated changelog. 2018-11-27 13:42:05 +01:00
Mark Paluch 35a772de2b DATACMNS-1407 - Updated changelog. 2018-11-27 12:36:47 +01:00
Mark Paluch 2c5bb149e6 DATACMNS-1408 - Updated changelog. 2018-11-27 11:27:20 +01:00
Mark Paluch 65a4d3f17b DATACMNS-1422 - Fall back to reflection-based PropertyAccessor/EntityInstantiator on inaccessible framework types.
We now fall back to reflection-based PropertyAccessor/EntityInstantiator strategies when framework types are not visible by the entity's ClassLoader.

Typically, we use class generation to create and load PropertyAccessor and EntityInstantiator classes to bypass reflection. Generated types are injected into the ClassLoader that has loaded the actual entity. Generated classes implement framework types such as ObjectInstantiator and these interfaces must be visible to the ClassLoader that hosts the generated class. Some arrangements, such as OSGi isolate class repositories so the OSGi class loader cannot load our own types which prevents loading the generated class.

Original pull request: #324.
2018-11-23 15:20:09 +01:00
Oliver Drotbohm 341613cc11 DATACMNS-1421 - Polishing.
Extracted method filter into dedicated method. Changed method order according to conventions.

Original pull request: #323.
2018-11-19 19:48:07 +01:00
Mark Paluch 2b02e612e0 DATACMNS-1421 - Lookup most specific wither method for a property.
We now inspect all methods that match the wither method pattern (name, accepting a single argument) to find the most specific method returning the actual entity type.

Previously, we attempted to find a method only considering name and argument properties and not the return type. This lookup strategy could find a method returning the entity super type that isn't assignable to the entity type.

Original pull request: #323.
2018-11-19 19:48:04 +01:00
Mark Paluch f5e5746750 DATACMNS-1415 - Use thread-safe caching in SpelAwareProxyProjectionFactory.
We now use ConcurrentHashMap as type instead of HashMap to properly synchronize concurrent updates to missing cache elements.

The previously used HashMap was not thread-safe so concurrent modifications resulted in ConcurrentModificationException.
2018-11-12 16:02:52 +01:00
Mark Paluch b832027825 DATACMNS-1406 - After release cleanups. 2018-10-29 13:59:17 +01:00
Mark Paluch 74a3520e04 DATACMNS-1406 - Prepare next development iteration. 2018-10-29 13:59:15 +01:00
Mark Paluch e6348a0830 DATACMNS-1406 - Release version 2.1.2 (Lovelace SR2). 2.1.2.RELEASE 2018-10-29 12:53:51 +01:00
Mark Paluch f474111e85 DATACMNS-1406 - Prepare 2.1.2 (Lovelace SR2). 2018-10-29 12:52:54 +01:00
Mark Paluch d04ee14cef DATACMNS-1406 - Updated changelog. 2018-10-29 12:52:44 +01:00
Mark Paluch 7a4e78f77b DATACMNS-1411 - Simplify TravisCI build definition.
Remove superfluous sudo declaration as TravisCI is decommissioning containerized builds.
2018-10-26 10:37:03 +02:00
Mark Paluch 0b6a7da787 DATACMNS-1403 - Polishing.
Rewrite auditing example to functional use of java.util.Optional.

Original pull request: #321.
2018-10-16 15:13:04 +02:00
heowc 9815cf5205 DATACMNS-1403 - Fixed example source in reference documentation.
Changed to example source for changed specifications.

Original pull request: #321.
2018-10-16 15:13:04 +02:00
Mark Paluch d7c5a446c9 DATACMNS-1388 - Updated changelog. 2018-10-15 14:19:02 +02:00
Mark Paluch 2ed8b10ba1 DATACMNS-1390 - Updated changelog. 2018-10-15 12:46:26 +02:00
Mark Paluch fd44c0691c DATACMNS-1395 - After release cleanups. 2018-10-15 11:12:14 +02:00
Mark Paluch fba3b35ca1 DATACMNS-1395 - Prepare next development iteration. 2018-10-15 11:12:12 +02:00
Mark Paluch 7c14c58531 DATACMNS-1395 - Release version 2.1.1 (Lovelace SR1). 2.1.1.RELEASE 2018-10-15 10:42:04 +02:00
Mark Paluch f2fe451a7b DATACMNS-1395 - Prepare 2.1.1 (Lovelace SR1). 2018-10-15 10:40:57 +02:00
Mark Paluch dae73e0697 DATACMNS-1395 - Updated changelog. 2018-10-15 10:40:49 +02:00
Mark Paluch 53e597c7a7 DATACMNS-1401 - Provide context class on runtime class definition.
We now provide the context class for private MethodHandle lookup in the context of the actual entity class to properly use MethodHandles.defineClass(…) and to avoid illegal access warnings caused by reflective access to the defineClass(…) method on class loaders.

Also, we now use the internal type name without adding the reference type decorator when casting the result of a wither invocation. CHECKCAST allowed on earlier Java runtimes (version 8 and earlier) to use the reference decorator (L…;) around the type name. Java 9 and newer reject this format with a ClassFormatError.

Original pull request: #318.
2018-10-08 13:54:16 +02:00
Oliver Gierke e4580e7544 DATACMNS-1396 - Polishing.
Original pull request: #319.
2018-10-08 13:54:16 +02:00
Mark Paluch 8d06a38fdb DATACMNS-1396 - Use best-effort caching in CustomConversions and DefaultTypeMapper.
We now apply best-effort caching instead of atomic caching for custom conversions and type mapping. This change is a workaround for a Java 8 bug in ConcurrentHashMap where the computeIfAbsent(…) operation unconditionally locks nodes even when the node is already present.

The workaround is to assume the optimistic case by looking up the key and then falling back to computeIfAbsent if the key is absent.

Before:
TypicalEntityReaderBenchmark.simpleEntityReflectivePropertyAccessWithCustomConversionRegistry  thrpt   10   6487423,969 ±  349449,326  ops/s
DefaultTypeMapperBenchmark.readTyped                                                           thrpt   10  38213392,961 ± 5080789,480  ops/s
DefaultTypeMapperBenchmark.readUntyped                                                         thrpt   10  47565238,929 ±  855200,560  ops/s

After:
TypicalEntityReaderBenchmark.simpleEntityReflectivePropertyAccessWithCustomConversionRegistry  thrpt   10    7361251,834 ±  278530,209  ops/s
DefaultTypeMapperBenchmark.readTyped                                                           thrpt   10  122523380,422 ± 3839365,439  ops/s
DefaultTypeMapperBenchmark.readUntyped                                                         thrpt   10  181767673,793 ± 3549021,260  ops/s

Original pull request: #319.
2018-10-08 13:54:09 +02:00
Mark Paluch 6481cbeec9 DATACMNS-1402 - Fix invocation of default Kotlin constructor.
We now correctly calculate the number of defaulting masks used to represent constructor arguments. Previously, we've been one off which caused that Kotlin classes with 32/33 parameters weren't able to be instantiated.

We also now reuse KotlinDefaultMask to apply defaulting calculation and removed code duplicates.
2018-10-04 14:38:35 +02:00
Mark Paluch 3935d1fdb7 DATACMNS-1400 - Do not consider bridge modifier in Kotlin default-method discovery.
We now no longer consider bridge modifiers when looking up Kotlin default methods. We previously included checks whether a synthetic default method is also a bridge method to take all specifics of synthetic methods into account. With Kotlin 1.3, the compiler no longer sets the bridge flag. This behavior change would previously prevent usage of the copy method with classes compiled with Kotlin 1.3.

Default method discovery is still guesswork and Kotlin compiler reverse engineering as there is no documentation on how to look up this kind of methods.

Further references:
* https://youtrack.jetbrains.net/issue/KT-24415 - Remove bridge flag from default methods.
* https://youtrack.jetbrains.net/issue/KT-27317 - No documented rules for discoverability of generated methods.
2018-10-04 10:59:30 +02:00
Oliver Gierke ecc09ce640 DATACMNS-1399 - Fixed unit tests after change in exception message.
Original pull request: #313.
2018-10-01 10:30:17 +02:00
Vjkumar Bokar db25fc6f66 DATACMNS-1399 - Fixed error message in repository fragment initialization.
Swapped parameters to match the placeholder semantics in the actual error message.

Original pull request: #313.
2018-10-01 10:15:59 +02:00
Mark Paluch 7006628a49 DATACMNS-1378 - After release cleanups. 2018-09-21 07:46:17 -04:00
Mark Paluch 1195d0de66 DATACMNS-1378 - Prepare next development iteration. 2018-09-21 07:46:16 -04:00
Mark Paluch c19774f117 DATACMNS-1378 - Release version 2.1 GA (Lovelace). 2.1.0.RELEASE 2018-09-21 07:08:38 -04:00
Mark Paluch 31be97e8c8 DATACMNS-1378 - Prepare 2.1 GA (Lovelace). 2018-09-21 07:07:50 -04:00
Mark Paluch c8066fd836 DATACMNS-1378 - Updated changelog. 2018-09-21 07:07:43 -04:00