Repository: quarkusio/quarkus
Issue: @RestCookie/@RestHeader (and relative @*Param) applied to Temporal parameter lead to deployment failure

### Describe the bug

```java
@Path("/hello")
public class GreetingResource {
    @Inject
    ObjectMapper mapper;

    @Path("{path}")
    @GET
    @Produces(MediaType.APPLICATION_JSON)
    public String hello(@RestQuery("query") Instant query, @RestPath("path") Instant path,
            @RestHeader("header") Instant header, @RestCookie("cookie") Instant cookie) throws IOException {}
}
```

header and cookie extracted as `java.time.temporal.*` produce and invalid build

```posh
Build step io.quarkus.resteasy.reactive.server.deployment.ResteasyReactiveProcessor#setupEndpoints threw an exception: java.lang.RuntimeException: java.lang.RuntimeException: Failed to process method 'org.acme.GreetingResource#hello'
	at org.jboss.resteasy.reactive.common.processor.EndpointIndexer.createEndpoints(EndpointIndexer.java:323)
	at io.quarkus.resteasy.reactive.server.deployment.ResteasyReactiveProcessor.setupEndpoints(ResteasyReactiveProcessor.java:633)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:909)
	at io.quarkus.builder.BuildContext.run(BuildContext.java:[281](https://github.com/luca-bassoricci/code-with-quarkus/actions/runs/4544958243/jobs/8011773735#step:4:282))
	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
	at java.base/java.lang.Thread.run(Thread.java:833)
	at org.jboss.threads.JBossThread.run(JBossThread.java:501)
Caused by: java.lang.RuntimeException: Failed to process method 'org.acme.GreetingResource#hello'
	at org.jboss.resteasy.reactive.common.processor.EndpointIndexer.createResourceMethod(EndpointIndexer.java:765)
	at org.jboss.resteasy.reactive.common.processor.EndpointIndexer.createEndpoints(EndpointIndexer.java:412)
	at org.jboss.resteasy.reactive.common.processor.EndpointIndexer.createEndpoints(EndpointIndexer.java:[290](https://github.com/luca-bassoricci/code-with-quarkus/actions/runs/4544958243/jobs/8011773735#step:4:291))
	... 12 more
Caused by: java.lang.RuntimeException: Could not create converter for java.time.Instant for method java.lang.String hello(java.time.Instant query, java.time.Instant path, java.time.Instant header, java.time.Instant cookie) throws java.io.IOException on class org.acme.GreetingResource of type HEADER
	at org.jboss.resteasy.reactive.server.processor.ServerEndpointIndexer.handleOtherParam(ServerEndpointIndexer.java:367)
	at org.jboss.resteasy.reactive.server.processor.ServerEndpointIndexer.handleOtherParam(ServerEndpointIndexer.java:96)
	at org.jboss.resteasy.reactive.common.processor.EndpointIndexer.extractParameterInfo(EndpointIndexer.java:1407)
	at org.jboss.resteasy.reactive.common.processor.EndpointIndexer.createResourceMethod(EndpointIndexer.java:592)
	... 14 more
Caused by: java.lang.RuntimeException: Failed to find converter for java.time.Instant
	at org.jboss.resteasy.reactive.server.processor.generation.converters.GeneratedConverterIndexerExtension.extractConverterImpl(GeneratedConverterIndexerExtension.java:106)
	at org.jboss.resteasy.reactive.server.processor.ServerEndpointIndexer.extractConverter(ServerEndpointIndexer.java:564)
	at org.jboss.resteasy.reactive.server.processor.ServerEndpointIndexer.handleOtherParam(ServerEndpointIndexer.java:363)
	... 17 more
```

### Expected behavior

A valid build with data extracted from header/cookie as Temporal value.

### Actual behavior

Invalid build

### How to Reproduce?

Reproducer at https://github.com/luca-bassoricci/code-with-quarkus; just build to reproduce the error


### Output of `uname -a` or `ver`

Windows 11

### Output of `java -version`

temurin 17

### GraalVM version (if different from Java)

_No response_

### Quarkus version or git rev

2.16.5.Final

### Build tool (ie. output of `mvnw --version` or `gradlew --version`)

_No response_

### Additional information

_No response_

Changed files:
independent-projects/resteasy-reactive/server/vertx/src/test/java/org/jboss/resteasy/reactive/server/vertx/test/simple/InstantParamTest.java
independent-projects/resteasy-reactive/server/vertx/src/test/java/org/jboss/resteasy/reactive/server/vertx/test/simple/LocalDateParamTest.java
independent-projects/resteasy-reactive/common/processor/src/main/java/org/jboss/resteasy/reactive/common/processor/EndpointIndexer.java
independent-projects/resteasy-reactive/server/vertx/src/test/java/org/jboss/resteasy/reactive/server/vertx/test/simple/LocalDateTimeParamTest.java

diff --git a/independent-projects/resteasy-reactive/common/processor/src/main/java/org/jboss/resteasy/reactive/common/processor/EndpointIndexer.java b/independent-projects/resteasy-reactive/common/processor/src/main/java/org/jboss/resteasy/reactive/common/processor/EndpointIndexer.java
index 3ab31b32824..05b7f10dc15 100644
--- a/independent-projects/resteasy-reactive/common/processor/src/main/java/org/jboss/resteasy/reactive/common/processor/EndpointIndexer.java
+++ b/independent-projects/resteasy-reactive/common/processor/src/main/java/org/jboss/resteasy/reactive/common/processor/EndpointIndexer.java
@@ -1382,7 +1382,8 @@ && isParameterContainerType(paramType.asClassType())) {
             handlePathSegmentParam(builder);
             typeHandled = true;
         } else if (SUPPORT_TEMPORAL_PARAMS.contains(paramType.name())
-                && (type == ParameterType.PATH || type == ParameterType.QUERY || type == ParameterType.FORM)) {
+                && (type == ParameterType.PATH || type == ParameterType.QUERY || type == ParameterType.FORM
+                        || type == ParameterType.COOKIE || type == ParameterType.HEADER)) {
             elementType = paramType.name().toString();
             handleTemporalParam(builder, paramType.name(), anns, currentMethodInfo);
             typeHandled = true;
diff --git a/independent-projects/resteasy-reactive/server/vertx/src/test/java/org/jboss/resteasy/reactive/server/vertx/test/simple/InstantParamTest.java b/independent-projects/resteasy-reactive/server/vertx/src/test/java/org/jboss/resteasy/reactive/server/vertx/test/simple/InstantParamTest.java
index 220a56196dd..c6fe44fe32f 100644
--- a/independent-projects/resteasy-reactive/server/vertx/src/test/java/org/jboss/resteasy/reactive/server/vertx/test/simple/InstantParamTest.java
+++ b/independent-projects/resteasy-reactive/server/vertx/src/test/java/org/jboss/resteasy/reactive/server/vertx/test/simple/InstantParamTest.java
@@ -4,9 +4,14 @@
 import java.time.Instant;
 
 import jakarta.ws.rs.GET;
+import jakarta.ws.rs.POST;
 import jakarta.ws.rs.Path;
 
 import org.hamcrest.Matchers;
+import org.jboss.resteasy.reactive.RestCookie;
+import org.jboss.resteasy.reactive.RestForm;
+import org.jboss.resteasy.reactive.RestHeader;
+import org.jboss.resteasy.reactive.RestPath;
 import org.jboss.resteasy.reactive.RestQuery;
 import org.jboss.resteasy.reactive.server.vertx.test.framework.ResteasyReactiveUnitTest;
 import org.jboss.shrinkwrap.api.ShrinkWrap;
@@ -24,11 +29,37 @@ public class InstantParamTest {
                     .addClasses(HelloResource.class));
 
     @Test
-    public void test() {
+    public void instantAsQueryParam() {
         RestAssured.get("/hello?instant=1984-08-08T01:02:03Z")
                 .then().statusCode(200).body(Matchers.equalTo("hello#1984-08-09T01:02:03Z"));
     }
 
+    @Test
+    public void instantAsPathParam() {
+        RestAssured.get("/hello/1984-08-08T01:02:03Z")
+                .then().statusCode(200).body(Matchers.equalTo("hello@1984-08-09T01:02:03Z"));
+    }
+
+    @Test
+    public void instantAsFormParam() {
+        RestAssured.given().formParam("instant", "1984-08-08T01:02:03Z").post("/hello")
+                .then().statusCode(200).body(Matchers.equalTo("hello:1984-08-09T01:02:03Z"));
+    }
+
+    @Test
+    public void instantAsHeader() {
+        RestAssured.with().header("instant", "1984-08-08T01:02:03Z")
+                .get("/hello/header")
+                .then().statusCode(200).body(Matchers.equalTo("hello=1984-08-09T01:02:03Z"));
+    }
+
+    @Test
+    public void instantAsCookie() {
+        RestAssured.with().cookie("instant", "1984-08-08T01:02:03Z")
+                .get("/hello/cookie")
+                .then().statusCode(200).body(Matchers.equalTo("hello/1984-08-09T01:02:03Z"));
+    }
+
     @Path("hello")
     public static class HelloResource {
 
@@ -36,6 +67,29 @@ public static class HelloResource {
         public String helloQuery(@RestQuery Instant instant) {
             return "hello#" + instant.plus(Duration.ofDays(1)).toString();
         }
+
+        @GET
+        @Path("{instant}")
+        public String helloPath(@RestPath Instant instant) {
+            return "hello@" + instant.plus(Duration.ofDays(1)).toString();
+        }
+
+        @POST
+        public String helloForm(@RestForm Instant instant) {
+            return "hello:" + instant.plus(Duration.ofDays(1)).toString();
+        }
+
+        @GET
+        @Path("cookie")
+        public String helloCookie(@RestCookie Instant instant) {
+            return "hello/" + instant.plus(Duration.ofDays(1)).toString();
+        }
+
+        @GET
+        @Path("header")
+        public String helloHeader(@RestHeader Instant instant) {
+            return "hello=" + instant.plus(Duration.ofDays(1)).toString();
+        }
     }
 
 }
diff --git a/independent-projects/resteasy-reactive/server/vertx/src/test/java/org/jboss/resteasy/reactive/server/vertx/test/simple/LocalDateParamTest.java b/independent-projects/resteasy-reactive/server/vertx/src/test/java/org/jboss/resteasy/reactive/server/vertx/test/simple/LocalDateParamTest.java
index f3b59f8d673..c98a886a8e8 100644
--- a/independent-projects/resteasy-reactive/server/vertx/src/test/java/org/jboss/resteasy/reactive/server/vertx/test/simple/LocalDateParamTest.java
+++ b/independent-projects/resteasy-reactive/server/vertx/src/test/java/org/jboss/resteasy/reactive/server/vertx/test/simple/LocalDateParamTest.java
@@ -3,8 +3,10 @@
 import java.time.LocalDate;
 import java.time.format.DateTimeFormatter;
 
+import jakarta.ws.rs.CookieParam;
 import jakarta.ws.rs.FormParam;
 import jakarta.ws.rs.GET;
+import jakarta.ws.rs.HeaderParam;
 import jakarta.ws.rs.POST;
 import jakarta.ws.rs.Path;
 import jakarta.ws.rs.PathParam;
@@ -43,6 +45,20 @@ public void localDateAsFormParam() {
                 .then().statusCode(200).body(Matchers.equalTo("hello:1995-09-22"));
     }
 
+    @Test
+    public void localDateAsHeader() {
+        RestAssured.with().header("date", "08-08-1984")
+                .get("/hello/header")
+                .then().statusCode(200).body(Matchers.equalTo("hello=1984-08-08"));
+    }
+
+    @Test
+    public void localDateAsCookie() {
+        RestAssured.with().cookie("date", "08-08-1984")
+                .get("/hello/cookie")
+                .then().statusCode(200).body(Matchers.equalTo("hello/1984-08-08"));
+    }
+
     @Path("hello")
     public static class HelloResource {
 
@@ -62,6 +78,20 @@ public String helloForm(
                 @FormParam("date") @DateFormat(dateTimeFormatterProvider = CustomDateTimeFormatterProvider.class) LocalDate date) {
             return "hello:" + date;
         }
+
+        @GET
+        @Path("cookie")
+        public String helloCookie(
+                @CookieParam("date") @DateFormat(pattern = "dd-MM-yyyy") LocalDate date) {
+            return "hello/" + date;
+        }
+
+        @GET
+        @Path("header")
+        public String helloHeader(
+                @HeaderParam("date") @DateFormat(pattern = "dd-MM-yyyy") LocalDate date) {
+            return "hello=" + date;
+        }
     }
 
     public static class CustomDateTimeFormatterProvider implements DateFormat.DateTimeFormatterProvider {
diff --git a/independent-projects/resteasy-reactive/server/vertx/src/test/java/org/jboss/resteasy/reactive/server/vertx/test/simple/LocalDateTimeParamTest.java b/independent-projects/resteasy-reactive/server/vertx/src/test/java/org/jboss/resteasy/reactive/server/vertx/test/simple/LocalDateTimeParamTest.java
index d69a18a11d5..7c4e9cb8e84 100644
--- a/independent-projects/resteasy-reactive/server/vertx/src/test/java/org/jboss/resteasy/reactive/server/vertx/test/simple/LocalDateTimeParamTest.java
+++ b/independent-projects/resteasy-reactive/server/vertx/src/test/java/org/jboss/resteasy/reactive/server/vertx/test/simple/LocalDateTimeParamTest.java
@@ -11,6 +11,8 @@
 
 import org.hamcrest.Matchers;
 import org.jboss.resteasy.reactive.DateFormat;
+import org.jboss.resteasy.reactive.RestCookie;
+import org.jboss.resteasy.reactive.RestHeader;
 import org.jboss.resteasy.reactive.RestPath;
 import org.jboss.resteasy.reactive.RestQuery;
 import org.jboss.resteasy.reactive.server.vertx.test.framework.ResteasyReactiveUnitTest;
@@ -55,6 +57,20 @@ public void localDateTimeAsFormParam() {
                 .then().statusCode(200).body(Matchers.equalTo("hello:22"));
     }
 
+    @Test
+    public void localDateTimeAsHeader() {
+        RestAssured.with().header("date", "1984-08-08 01:02:03")
+                .get("/hello/header")
+                .then().statusCode(200).body(Matchers.equalTo("hello=1984-08-08T01:02:03"));
+    }
+
+    @Test
+    public void localDateTimeAsCookie() {
+        RestAssured.with().cookie("date", "1984-08-08 01:02:03")
+                .get("/hello/cookie")
+                .then().statusCode(200).body(Matchers.equalTo("hello/1984-08-08T01:02:03"));
+    }
+
     @Path("hello")
     public static class HelloResource {
 
@@ -80,6 +96,18 @@ public String helloForm(
                 @FormParam("date") @DateFormat(dateTimeFormatterProvider = CustomDateTimeFormatterProvider.class) LocalDateTime date) {
             return "hello:" + date.getDayOfMonth();
         }
+
+        @Path("cookie")
+        @GET
+        public String helloCookie(@RestCookie @DateFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime date) {
+            return "hello/" + date;
+        }
+
+        @Path("header")
+        @GET
+        public String helloHeader(@RestHeader @DateFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime date) {
+            return "hello=" + date;
+        }
     }
 
     public static class CustomDateTimeFormatterProvider implements DateFormat.DateTimeFormatterProvider {