-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
RESTEasy Reactive: issues with char
parameter
#24541
Milestone
Comments
/cc @geoand, @stuartwdouglas |
I'll have a look, thanks |
Here is a test case that reproduces the issue: package org.jboss.resteasy.reactive.server.vertx.test.simple;
import org.jboss.resteasy.reactive.server.vertx.test.framework.ResteasyReactiveUnitTest;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.QueryParam;
import static io.restassured.RestAssured.when;
import static org.hamcrest.Matchers.equalTo;
public class ParamConverterTest {
@RegisterExtension
static ResteasyReactiveUnitTest test = new ResteasyReactiveUnitTest()
.setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class)
.addClasses(EchoResource.class));
@Test
public void charParam() {
when().get("/echo/character?param=a")
.then()
.statusCode(200)
.body(equalTo("a"));
}
@Path("echo")
public static class EchoResource {
@Path("character")
@GET
public String echoChar(@QueryParam("param") char param) {
return "" + param;
}
}
} |
geoand
added a commit
to geoand/quarkus
that referenced
this issue
Mar 25, 2022
|
geoand
added a commit
to geoand/quarkus
that referenced
this issue
Mar 28, 2022
FroMage
added a commit
that referenced
this issue
Mar 29, 2022
Properly handle char and Character parameter types in JAX-RS methods
gsmet
pushed a commit
to gsmet/quarkus
that referenced
this issue
Mar 29, 2022
Fixes: quarkusio#24541 (cherry picked from commit 18a6af3)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When I have an endpoint with a
char
parameter, native-image doesn't work:This is due to https://github.com/quarkusio/quarkus/blob/main/independent-projects/resteasy-reactive/server/processor/src/main/java/org/jboss/resteasy/reactive/server/processor/generation/converters/GeneratedConverterIndexerExtension.java because
Character.valueOf(String)
doesn't exist.If you don't compile natively, endpoints with a
char
parameter return a 404 because some converter is needed:I don't think this converter should be required, so it's probably a bug.
Expected behavior
No response
Actual behavior
No response
How to Reproduce?
No response
Output of
uname -a
orver
No response
Output of
java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
No response
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: