question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Resteasy Reactive Client: Parameter "annotations" is always null in ParamConverterProvider

See original GitHub issue

Describe the bug

The parameter annotations in ParamConverterProvider is always null.

Expected behavior

No response

Actual behavior

No response

How to Reproduce?

@Path("/")
@RegisterProvider(MyParamConverterProvider::class)
interface MyRestService {

    @POST
    @Path("/{x}")
    fun xyz(@PathParam("x") @MyParam value: String): Uni<String>
}

@MustBeDocumented
@Retention(AnnotationRetention.RUNTIME)
@Target(AnnotationTarget.FIELD, AnnotationTarget.VALUE_PARAMETER)
annotation class MyParam

class MyParamConverter : ParamConverter<String> {

    override fun toString(value: String): String = value

    override fun fromString(value: String): String = value
}

class MyParamConverterProvider : ParamConverterProvider {

    override fun <T : Any?> getConverter(
        rawType: Class<T>?,
        genericType: Type?,
        annotations: Array<out Annotation>?
    ): ParamConverter<T>? {
	// "annotations" is alway null
        return annotations?.filterIsInstance(MyParam::class.java)?.firstOrNull()?.let {
            MyParamConverter() as ParamConverter<T>
        }
    }
}

Output of uname -a or ver

No response

Output of java -version

Java 11

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.6.2

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

Maven

Additional information

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Sgitariocommented, Jan 19, 2022

@Sgitario you might be interested in this one.

Added to my TODO list.

1reaction
geoandcommented, Jan 19, 2022

Not sure, we have a lot to get done for 2.7.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Writing REST Services with RESTEasy Reactive - Quarkus
This is the reference guide for RESTEasy Reactive. For a more lightweight introduction ... Table 2. Table HTTP request parameter annotations ...
Read more >
RESTEasy JAX-RS - JBoss.org
Processing Spring Web REST annotations in RESTEasy; 48.6. ... use optional typed parameters, and eliminate all null checks by using methods like Optional....
Read more >
Chapter 2. Developing Jakarta RESTful Web Services Web ...
These annotations simplify the process of mapping Java objects to web ... a parameter to your Jakarta RESTful Web Services method prompts RESTEasy...
Read more >
Index (RESTEasy Reactive - Runtime 2.7.0.Final API)
Returns an alternate endpoint invoker for this method. annotations - Variable in class org.jboss.resteasy.reactive.server.jaxrs.
Read more >
jax rs - Method parameter annotated with @FormParam is ...
But the parameters sent by the client are always received as null . @POST @Path("/login") @Produces({ "application/json" }) public ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found