Make sure to use the raw type or java.lang.Object for unresolvable generic method parameters while retaining the type variable in the method signature.
See: #3374
Decouple RepositoryRegistrationAotContribution and RepositoryRegistrationAotProcessor, introduce support class for AotRepositoryContext implementations to better protect AotRepositoryContext implementations from changes to AotContext.
Remove contribute method from AotTypeConfiguration and move contribution code to AotContext.
Deprecate introspection methods for removal with only a single use in Commons and no usage in other modules.
Add more fine-grained customization hooks to RepositoryRegistrationAotProcessor and remove superfluous context objects that aren't necessary in their context.
Closes: #3267
Original Pull Request: #3367
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
We now provide a SPI for libraries that want to provide predicates for AOT processing so that AOT processing not only considers its own rules but also e.g. exclusions from other participants on the class path.
See: #3362
Original Pull Request: #3363
Add generic signature, skip static initializer if not required, access classes in static initializer through constants instead of using forName(…).
See #3365
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
Add tests, refine API contracts and reflect it in the documentation, remove methods that seem useful but are rather polluting the API.
Original Pull Request: #3357
Add opinionated builders for return statements and invocations, add introspection type for MethodReturns to reduce checks for e.g. `Optional` and `void` and utilities to construct type names.
Closes: #3357
Throw MappingException referring to the entity type for easier debugging of the property creation chain.
Add exclusion for properties starting with $$_ (synthetic Hibernate fields). Exclude java.util and javax types from AOT entity processing as well as arrays.
See #2595
Original Pull Request: #3318
Move off TypeReference for known and loaded classes for easier handling. Introduce configuration for enabled and include/exclude filters. Refactor configuration to functional style.
Original Pull Request: #3318
We now pre-initialize ClassGeneratingPropertyAccessorFactory and ClassGeneratingEntityInstantiator infrastructure to generate bytecode for their respective classes so that we include the generated code for the target AOT package. Also, we check for presence of these types to conditionally load generated classes if these are on the classpath.
This change required a stable class name therefore, we're hashing the fully-qualified class name and have aligned the class name from _Accessor to __Accessor (two underscores instead of one, same for Instantiator).
Closes: #2595
Original Pull Request: #3318
Prior to this change regenerating repository instances for eg. test execution caused trouble when trying to override existing json metadata files. We now back off in case of existing files and added an explicit config flag for users to opt out of having the metadata file being present in the target resources.
Original pull request: #3355Closes#3354