Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

Avoid creating reflection entries for java and primitive types. #1346

Merged
merged 1 commit into from
Dec 6, 2021

Conversation

christophstrobl
Copy link
Contributor

This commit fixes an issue where the JPA processor inspects too many types for potential reflection configuration. We now skip types within the java namespace as well as primitives and primitive arrays.

This commit fixes an issue where the JPA processor inspects too many types for potential reflection configuration. We now skip types within the java namespace as well as primitives and primitive arrays.
@sdeleuze
Copy link
Contributor

sdeleuze commented Dec 6, 2021

@schauder I am hesitant about what is the right behavior for JPA native reflection configuration for Java/primitive types. Currently it provide full reflection for all methods/constructors/fields of java.* types, that's too much for sure. But should we skip those totally or just configure reflection on related class without methods/constructors/fields flags (depending on what JPA/Hibernate require)?

@schauder
Copy link
Contributor

schauder commented Dec 6, 2021

This seems appropriate to me. I find it highly unlikely that Hibernate (or any other JPA implementation) uses reflection to access java.* classes via reflection. I would expect them to do just a type check and then cast accordingly which also should make Graal include the respective class in the binary.

Of course, there is always the risk that Hibernate does something evil with some special type, but if that is the case I think our only chance is to find it via a bug report.

@sdeleuze sdeleuze added this to the 0.11.0 milestone Dec 6, 2021
@sdeleuze sdeleuze added the type: enhancement A general enhancement label Dec 6, 2021
@sdeleuze sdeleuze merged commit a8e49b9 into spring-attic:main Dec 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: enhancement A general enhancement
Development

Successfully merging this pull request may close these issues.

3 participants