The getNullable() method had a subtle race condition where the value field
could be read as null after being assigned but before the resolved flag was
set to true. This could occur if another thread read the value between lines
136 and 137.
This change maintains the existing behavior documented in the class Javadoc
that the supplier may be called multiple times under concurrent access, while
fixing the potential for incorrect null returns.
Signed-off-by: jbj338033 <jbj338033@gmail.com>
Closes#3368
Customizing EntityInformation has only a single use-case within JPA. All other modules should use customization using the mentioned mechanisms as the underlying MappingContext handles typically IsNew detection but customizing the MappingContext (PersistentEntity) is a deeply involved task.
Closes#3364
We now create a decoupled instance of ClassTypeInformation to avoid initialization visibility cycle issues when TypeInformation.OBJECT (and other fields) are initialized with null because ClassTypeInformation.OBJECT hasn't been initialized yet.
Closes#3340
We now fetch mapping contexts from Iterable<MappingContext> later, when accessing PersistentEntities API to defer potential resolution when e.g. obtaining beans from a BeanFactory.
Closes#3310
>> There are no guarantees on the type, mutability, serializability, or thread-safety of the List returned
`Collector.toList()` doesn't guarantee mutability, then passing it to `Collections.reverse()` is not safe.
Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
Closes#3304
The ProxyHandlerMethodArgumentResolver now avoids matching multipart parameters annotated with @ModelAttribute. This allows multipart parameters to be handled by RequestParamMethodArgumentResolver which properly handles multipart arguments.
Also, the `@ProjectedPayload` annotation can now be used on parameters. This prepares for the upcoming removal of support for non-annotated projections.
Fixes#3258
Related tickets #2937
Original pull request: #3277
Signed-off-by: Chris Bono <chris.bono@broadcom.com>