-
Notifications
You must be signed in to change notification settings - Fork 687
Modify it to avoid adding runtimeHints for primitive types and array types. #3284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…types. Related tickets: spring-projects/spring-data-mongodb#4958 Signed-off-by: ckdgus08 <ckdgus0808@naver.com>
@@ -41,6 +41,10 @@ public static void contributeEntityPath(Class<?> type, GenerationContext context | ||
return; | ||
} | ||
|
||
if (type.isPrimitive() || type.isArray()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: We should use ClassUtils.isPrimitiveOrWrapper(…)
and ReflectionUtils.isVoid(…)
to avoid adding type hints for primitive wrappers or Kotlin's Unit
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we can just skip arrays in here. GraalVM needs reflection hint entries for them in order to allow access to java.lang.Class arrayType()
, which (as per documentation) requires metadata for the array type like in this example for HikariCP:
{
"condition": {
"typeReachable": "com.zaxxer.hikari.pool.PoolEntry"
},
"name": "[Ljava.sql.Statement;"
}
Closes: #3284 See: spring-projects/spring-data-mongodb#4958 Signed-off-by: ckdgus08 <ckdgus0808@naver.com>
Closes: #3284 See: spring-projects/spring-data-mongodb#4958 Signed-off-by: ckdgus08 <ckdgus0808@naver.com>
Revert changes targeting primitive and array types explicitly to extract minimal inversive change switching getPackage().getName() to getPackageName(). Original Pull Request: #3284
Use getPackageName() instead of getPackage().getName(), remove essentially duplicate tests and fix array type handling of Q types by using the arrays component type for assignability checks. Original Pull Request: #3284
Closes: #3284 See: spring-projects/spring-data-mongodb#4958 Signed-off-by: ckdgus08 <ckdgus0808@naver.com>
Revert changes targeting primitive and array types explicitly to extract minimal inversive change switching getPackage().getName() to getPackageName(). Original Pull Request: #3284
Closes: #3284 See: spring-projects/spring-data-mongodb#4958 Signed-off-by: ckdgus08 <ckdgus0808@naver.com>
Revert changes targeting primitive and array types explicitly to extract minimal inversive change switching getPackage().getName() to getPackageName(). Original Pull Request: #3284
Thank you @ckdgus08 for your contribution. |
Related tickets: spring-projects/spring-data-mongodb#4958