Skip to content
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 Client default methods #19226

Closed
rvansa opened this issue Aug 4, 2021 · 3 comments
Closed

RestEasy Client default methods #19226

rvansa opened this issue Aug 4, 2021 · 3 comments
Labels
area/rest-client kind/bug Something isn't working triage/wontfix This will not be worked on

Comments

@rvansa
Copy link
Contributor

rvansa commented Aug 4, 2021

Describe the bug

When calling a default method on interface using @RegisterRestClient the default method is not invoked; instead I get an error saying

Could not find a method for: public default java.util.concurrent.CompletionStage io.foo.Bar.getFoo(java.lang.String)

Refactoring the code to use static methods on the interface works but is not that convenient.

Expected behavior

The default method (actually decorating the call to another interface's method) is invoked and it will call the actual method, executing the REST request.

Actual behavior

An error is thrown.

How to Reproduce?

@GET
@Path("foo")
CompletionStage<String> getFoo(@HeaderParam("Authorization") String authorization, @QueryParam("bar") String bar);

default CompletionStage<String> getFoo(String bar) {
  return getFoo("Bearer xyz", bar);
}

Output of uname -a or ver

No response

Output of java -version

openjdk version "11.0.9" 2020-10-20

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.1.0

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

@rvansa rvansa added the kind/bug Something isn't working label Aug 4, 2021
@geoand
Copy link
Contributor

geoand commented Aug 5, 2021

FWIW, this works fine with the reactive rest client

@quarkus-bot
Copy link

quarkus-bot bot commented Aug 5, 2021

/cc @michalszynkiewicz

@geoand
Copy link
Contributor

geoand commented Nov 3, 2021

I am going to close this as won't fix since we already have a working alternative with the reactive rest client

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/rest-client kind/bug Something isn't working triage/wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants