Skip to content

Conversation

mkouba
Copy link
Contributor

@mkouba mkouba commented Sep 22, 2025

  • when a primitive param is annotated with a type annotation

Unfortunately, the only workaround I can see is to avoid using primitives and use the wrapper types instead.

Fixes #50225.

@mkouba mkouba requested a review from Ladicek September 22, 2025 18:33
@quarkus-bot quarkus-bot bot added the area/arc Issue related to ARC (dependency injection) label Sep 22, 2025
@manovotn
Copy link
Contributor

Unfortunately, the only workaround I can see is to avoid using primitives and use the wrapper types instead.

That should be no issue though, right?

This comment has been minimized.

@mkouba
Copy link
Contributor Author

mkouba commented Sep 23, 2025

Unfortunately, the only workaround I can see is to avoid using primitives and use the wrapper types instead.

That should be no issue though, right?

Well, I wouldn't call it "no issue" because whenever you use a primitive param with a type annotation on a method that is called via Invoker then you get a NPE during build and the error message is not exactly "actionable".

Copy link
Contributor

@Ladicek Ladicek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, although the test on several places iterates over a singleton list, which is unnecessary.

@mkouba
Copy link
Contributor Author

mkouba commented Sep 23, 2025

LGTM, although the test on several places iterates over a singleton list, which is unnecessary.

Yeah, sure. I just copied and modified one of the existing test. Feel free to jump in this PR ;-).

- when a primitive param is annotated with a type annotation
@Ladicek Ladicek force-pushed the invoker-generator-primitive-type-anno branch from 2634cef to 1e9dec5 Compare September 23, 2025 07:08
@Ladicek
Copy link
Contributor

Ladicek commented Sep 23, 2025

Done :-)

@mkouba mkouba added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Sep 23, 2025
Copy link

quarkus-bot bot commented Sep 23, 2025

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit 1e9dec5.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

You can consult the Develocity build scans.


Flaky tests - Develocity

⚙️ JVM Tests - JDK 21

📦 extensions/smallrye-openapi/deployment

io.quarkus.smallrye.openapi.test.vertx.OpenApiHttpRootPathCorsTestCase.testCorsFilterProperties - History

  • 1 expectation failed. Expected status code <200> but was <500>. - java.lang.AssertionError
java.lang.AssertionError: 
1 expectation failed.
Expected status code <200> but was <500>.

	at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:486)
	at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:73)

@geoand geoand merged commit 17bf484 into quarkusio:main Sep 23, 2025
57 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.29 - main milestone Sep 23, 2025
@quarkus-bot quarkus-bot bot removed the triage/waiting-for-ci Ready to merge when CI successfully finishes label Sep 23, 2025
@gsmet gsmet modified the milestones: 3.29 - main, 3.28.1 Sep 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/arc Issue related to ARC (dependency injection) triage/backport-3.27 triage/flaky-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build fails if a param with a primitive type and type annotation is declared on a method that is called via Invoker

5 participants