Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Closed
wants to merge 1 commit into from

Conversation

ckdgus08
Copy link
Contributor

@ckdgus08 ckdgus08 commented May 4, 2025

Related tickets: spring-projects/spring-data-mongodb#4958

  • You have read the Spring Data contribution guidelines.
  • You use the code formatters provided here and have them applied to your changes. Don’t submit any formatting related changes.
  • You submit test cases (unit or integration tests) that back your changes.
  • You added yourself as author in the headers of the classes you touched. Amend the date range in the Apache license header if needed. For new types, add the license header (copy from another file and set the current year only).

…types.

Related tickets: spring-projects/spring-data-mongodb#4958

Signed-off-by: ckdgus08 <ckdgus0808@naver.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label May 4, 2025
@mp911de mp911de added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels May 5, 2025
@@ -41,6 +41,10 @@ public static void contributeEntityPath(Class<?> type, GenerationContext context
return;
}

if (type.isPrimitive() || type.isArray()) {
Copy link
Member

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.

Copy link
Member

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;"
}

@mp911de mp911de added this to the 3.3.13 (2024.0.13) milestone Jun 4, 2025
christophstrobl pushed a commit that referenced this pull request Jun 5, 2025
christophstrobl pushed a commit that referenced this pull request Jun 5, 2025
christophstrobl added a commit that referenced this pull request Jun 5, 2025
Revert changes targeting primitive and array types explicitly to extract minimal inversive change switching getPackage().getName() to getPackageName().

Original Pull Request: #3284
christophstrobl added a commit that referenced this pull request Jun 5, 2025
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
christophstrobl pushed a commit that referenced this pull request Jun 5, 2025
christophstrobl added a commit that referenced this pull request Jun 5, 2025
Revert changes targeting primitive and array types explicitly to extract minimal inversive change switching getPackage().getName() to getPackageName().

Original Pull Request: #3284
christophstrobl pushed a commit that referenced this pull request Jun 5, 2025
christophstrobl added a commit that referenced this pull request Jun 5, 2025
Revert changes targeting primitive and array types explicitly to extract minimal inversive change switching getPackage().getName() to getPackageName().

Original Pull Request: #3284
@christophstrobl
Copy link
Member

Thank you @ckdgus08 for your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.