anon-iclr-submission/benchname-bug-localization huggingface dataset:
Repository: quarkusio/quarkus
Issue: [quarkus-quartz] `cron` expression of `@Scheduled` is not updated via ENV (overwriting application.properties)

### Describe the bug

Given
* `@Scheduled(identity = "aJob", cron = "{a.job.schedule.cron}")` in code
* `a.job.schedule.cron=0 0 1 * * ? *` in application.properties and
* `A_JOB_SCHEDULE_CRON=0 0 1 * * ? 2100` in ENV

if the application has been started prior without the ENV part, restarting the application with ENV doesn't update the field `cron_expression` in the table `qrtz_cron_triggers`.

if the application has not been started prior without the ENV part, starting it the first time with ENV leads to `cron_expression` being filled with the cron expression from ENV, not from application.properties (as expected).

### Expected behavior

Field `cron_expression` in the table `qrtz_cron_triggers` is updated.

Alternatively, this behaviour is documented on the https://quarkus.io/guides/quartz and there is a way to overwrite existing cron expressions using ENV.

### Actual behavior

Field `cron_expression` in the table `qrtz_cron_triggers` is not updated.

### How to Reproduce?

_No response_

### Output of `uname -a` or `ver`

Microsoft Windows [Version 10.0.18363.1766]

### Output of `java -version`

11.0.10

### GraalVM version (if different from Java)

_No response_

### Quarkus version or git rev

2.2.1.Final

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

Apache Maven 3.8.1

### Additional information

_No response_

Changed files:
extensions/quartz/runtime/src/main/java/io/quarkus/quartz/runtime/QuartzScheduler.java

diff --git a/extensions/quartz/runtime/src/main/java/io/quarkus/quartz/runtime/QuartzScheduler.java b/extensions/quartz/runtime/src/main/java/io/quarkus/quartz/runtime/QuartzScheduler.java
index d3d49675bab..d3939ebe628 100644
--- a/extensions/quartz/runtime/src/main/java/io/quarkus/quartz/runtime/QuartzScheduler.java
+++ b/extensions/quartz/runtime/src/main/java/io/quarkus/quartz/runtime/QuartzScheduler.java
@@ -195,10 +195,15 @@ public QuartzScheduler(SchedulerContext context, QuartzSupport quartzSupport, Sc
                         }
 
                         JobDetail job = jobBuilder.build();
+                        org.quartz.Trigger trigger = triggerBuilder.build();
                         if (!scheduler.checkExists(job.getKey())) {
-                            scheduler.scheduleJob(job, triggerBuilder.build());
+                            scheduler.scheduleJob(job, trigger);
                             LOGGER.debugf("Scheduled business method %s with config %s", method.getMethodDescription(),
                                     scheduled);
+                        } else {
+                            scheduler.rescheduleJob(trigger.getKey(), trigger);
+                            LOGGER.debugf("Rescheduled business method %s with config %s", method.getMethodDescription(),
+                                    scheduled);
                         }
                     }
                 }
Repository: quarkusio/quarkus
Issue: Resteasy Reactive Security Context Exception

Hello. I am trying to update the security context in a RequestFilter like this:
`context.securityContext = GatewaySecurityContext(context.securityContext, principalDetails) `. 

This is working with RestEasy Classic. Unfortunately using RestEasy Reactive I am getting the following error:
 ```
io.quarkus.resteasy.reactive.server.runtime.security.SecurityContextOverrideHandler.updateIdentity(SecurityContextOverrideHandler.java:48)
```

The issue is that in the following code

```
Uni<SecurityIdentity> oldIdentity = currentIdentityAssociation.getDeferredIdentity();
        currentIdentityAssociation.setIdentity(oldIdentity.map(new Function<SecurityIdentity, SecurityIdentity>() {
```
**oldIdentity** is **null** in the `SecurityContextOverrideHandler` class.

Is there anything I need to be aware of or am I doing something wrong here ?

Changed files:
extensions/security/runtime/src/main/java/io/quarkus/security/runtime/SecurityIdentityAssociation.java

diff --git a/extensions/security/runtime/src/main/java/io/quarkus/security/runtime/SecurityIdentityAssociation.java b/extensions/security/runtime/src/main/java/io/quarkus/security/runtime/SecurityIdentityAssociation.java
index b184aceeefe..c1af7b17381 100644
--- a/extensions/security/runtime/src/main/java/io/quarkus/security/runtime/SecurityIdentityAssociation.java
+++ b/extensions/security/runtime/src/main/java/io/quarkus/security/runtime/SecurityIdentityAssociation.java
@@ -48,7 +48,13 @@ public void setIdentity(Uni<SecurityIdentity> identity) {
     }
 
     public Uni<SecurityIdentity> getDeferredIdentity() {
-        return deferredIdentity;
+        if (deferredIdentity != null) {
+            return deferredIdentity;
+        } else if (identity != null) {
+            return Uni.createFrom().item(identity);
+        } else {
+            return deferredIdentity = identityProviderManager.authenticate(AnonymousAuthenticationRequest.INSTANCE);
+        }
     }
 
     @Override
Repository: quarkusio/quarkus
Issue: HashiCorp key vault does not override application.properties

**Describe the bug**
HashiCorp vault does not override properties in application.properties

**Expected behavior**
Values in application.properties that share the same name described in vault should be overridden. 

**Actual behavior**
Only the values in application.properties gets assigned. 

**To Reproduce**

https://quarkus.io/guides/vault
follow this guide while having a value for "a-private-key" in application.properties


Steps to reproduce the behavior:
1. Create a secret in vault
2. Use the same secret with diffrent value in appliction.properties
icable, add screenshots to help explain your problem.)

**Environment **
 Quarkus 1.11.1.Final


Changed files:
extensions/vault/runtime/src/main/java/io/quarkus/vault/runtime/config/VaultConfigSourceProvider.java

diff --git a/extensions/vault/runtime/src/main/java/io/quarkus/vault/runtime/config/VaultConfigSourceProvider.java b/extensions/vault/runtime/src/main/java/io/quarkus/vault/runtime/config/VaultConfigSourceProvider.java
index d76e9fd1458..3dbfcdc16b1 100644
--- a/extensions/vault/runtime/src/main/java/io/quarkus/vault/runtime/config/VaultConfigSourceProvider.java
+++ b/extensions/vault/runtime/src/main/java/io/quarkus/vault/runtime/config/VaultConfigSourceProvider.java
@@ -18,6 +18,7 @@ public VaultConfigSourceProvider(VaultBootstrapConfig vaultBootstrapConfig) {
 
     @Override
     public Iterable<ConfigSource> getConfigSources(ClassLoader forClassLoader) {
-        return Arrays.asList(new VaultConfigSource(150, vaultBootstrapConfig));
+        // 270 is higher than the file system or jar ordinals, but lower than env vars
+        return Arrays.asList(new VaultConfigSource(270, vaultBootstrapConfig));
     }
 }
Repository: quarkusio/quarkus
Issue: Vertx PgPool lost connection unexpectedly

When a user gets a connection from`pgPool` some milliseconds behind IDLE expiration time, then "sometimes" when you are going to use the connection, you get the following error from the server:

`Fail to read any response from the server, the underlying connection might get lost unexpectedly.`

So, looks that the connection it's available when you request it, but then disappears when you use it. 

**Expected behavior**
The connection should be validated (maybe by a query), before return an available connection.

**Actual behavior**
An end-user could get a connection that is not available anymore. 


**To Reproduce**

You could run the [following test](https://github.com/pjgg/beefy-scenarios/blob/feature/vertx-sql/303-quarkus-vertx-sql/src/test/java/io/quarkus/qe/vertx/sql/dbpool/DbPostgresPoolTest.java#L100)

[Jira Ref](https://issues.redhat.com/browse/QUARKUS-719)

Changed files:
extensions/reactive-datasource/runtime/src/main/java/io/quarkus/reactive/datasource/runtime/DataSourceReactiveRuntimeConfig.java

diff --git a/extensions/reactive-datasource/runtime/src/main/java/io/quarkus/reactive/datasource/runtime/DataSourceReactiveRuntimeConfig.java b/extensions/reactive-datasource/runtime/src/main/java/io/quarkus/reactive/datasource/runtime/DataSourceReactiveRuntimeConfig.java
index 4885d0fbcad..5e0770fd8e6 100644
--- a/extensions/reactive-datasource/runtime/src/main/java/io/quarkus/reactive/datasource/runtime/DataSourceReactiveRuntimeConfig.java
+++ b/extensions/reactive-datasource/runtime/src/main/java/io/quarkus/reactive/datasource/runtime/DataSourceReactiveRuntimeConfig.java
@@ -110,7 +110,7 @@ public class DataSourceReactiveRuntimeConfig {
     public Duration reconnectInterval = Duration.ofSeconds(1L);
 
     /**
-     * The maximum time without data written to or read from a connection before it is removed from the pool.
+     * The maximum time without data written to or read from a connection before it is closed.
      */
     @ConfigItem(defaultValueDocumentation = "no timeout")
     public Optional<Duration> idleTimeout = Optional.empty();
Repository: quarkusio/quarkus
Issue: Quarkus KafkaStream application do not close immediately when no broker is present 

**Describe the bug**
Quarkus application using the kafka-stream extension do not close immediately if the kafka broker is not available at the time the application starts. 

**Expected behavior**
If no broker available the application have to shutdown immediately

**Actual behavior**
When closing the application, the admin client that is used by the kafkastream extension do not close immediately because it waits to perform startup task (querying metadata) that need to timeout before closing the admin client.


**To Reproduce**
* Start a kafkastream application without starting any kafka broker 
* Quit the application (with Ctrl-C)
* Wait (60s) and read the following message : 

`
2020-11-16 12:05:28,601 WARN  [org.apa.kaf.cli.NetworkClient] (kafka-admin-client-thread | adminclient-1) [AdminClient clientId=adminclient-1] Connection to node -1 (localhost/127.0.0.1:9092) could not be established. Broker may not be available.
2020-11-16 12:05:29,410 INFO  [org.apa.kaf.cli.adm.int.AdminMetadataManager] (kafka-admin-client-thread | adminclient-1) [AdminClient clientId=adminclient-1] Metadata update failed: org.apache.kafka.common.errors.TimeoutException: Call(callName=fetchMetadata, deadlineMs=1605524729409) timed out at 1605524729410 after 1 attempt(s)
Caused by: org.apache.kafka.common.errors.TimeoutException: Timed out waiting for a node assignment.
2020-11-16 12:05:29,773 INFO  [org.apa.kaf.cli.adm.int.AdminMetadataManager] (kafka-admin-client-thread | adminclient-1) [AdminClient clientId=adminclient-1] Metadata update failed: org.apache.kafka.common.errors.TimeoutException: Call(callName=fetchMetadata, deadlineMs=1605524759410) timed out at 9223372036854775807 after 1 attempt(s)
Caused by: org.apache.kafka.common.errors.TimeoutException: The AdminClient thread has exited.
`
Regards

Changed files:
extensions/kafka-streams/runtime/src/main/java/io/quarkus/kafka/streams/runtime/KafkaStreamsProducer.java

diff --git a/extensions/kafka-streams/runtime/src/main/java/io/quarkus/kafka/streams/runtime/KafkaStreamsProducer.java b/extensions/kafka-streams/runtime/src/main/java/io/quarkus/kafka/streams/runtime/KafkaStreamsProducer.java
index 088e7cb81a7..bf90ed4a76d 100644
--- a/extensions/kafka-streams/runtime/src/main/java/io/quarkus/kafka/streams/runtime/KafkaStreamsProducer.java
+++ b/extensions/kafka-streams/runtime/src/main/java/io/quarkus/kafka/streams/runtime/KafkaStreamsProducer.java
@@ -122,7 +122,7 @@ void onStop(@Observes ShutdownEvent event) {
             kafkaStreams.close();
         }
         if (kafkaAdminClient != null) {
-            kafkaAdminClient.close();
+            kafkaAdminClient.close(Duration.ZERO);
         }
     }
Repository: quarkusio/quarkus
Issue: Quitting quarkus:dev with Ctrl+C doesn't allow @PreDestroy hooks to finish

**Describe the bug**
When exiting `quarkus:dev` mode with Ctrl+C, `@PreDestroy` hooks rarely have enough time to complete.

**Expected behavior**
Other CDI containers I've used trap the Ctrl+C signal to finish completion of all `@PreDestroy` hooks before exiting the container.

**Actual behavior**
`@PreDestroy` appear to be called, but it looks like thread pools are terminated before they're done executing. I only rarely see the results of print statements I have in my `@PreDestroy` hooks.


**To Reproduce**
Set up a `@PreDestroy` hook with some print statements. Exit from an `mvn compile quarkus:dev` session, and see that the print statements infrequently execute.

Changed files:
devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java

diff --git a/devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java b/devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java
index 7722c8e98de..ce34e442a0a 100644
--- a/devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java
+++ b/devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java
@@ -903,6 +903,11 @@ public void run() throws Exception {
                 @Override
                 public void run() {
                     process.destroy();
+                    try {
+                        process.waitFor();
+                    } catch (InterruptedException ignored) {
+                        getLog().warn("Unable to properly wait for dev-mode end", ignored);
+                    }
                 }
             }, "Development Mode Shutdown Hook"));
         }
Repository: quarkusio/quarkus
Issue: At create from command line are have wrong version dependency

If create quarkus project from command line like indicated on site
for gradle:
```mvn io.quarkus:quarkus-maven-plugin:1.8.3.Final:create \\
    -DprojectGroupId=com.test \\
    -DprojectArtifactId=create-test-gradle \\
    -DprojectVersion=my-version \\
    -DclassName="org.my.group.MyResource" \\
    -Dextensions="resteasy-jsonb" \\
    -DbuildTool=gradle
```
for maven:
```mvn io.quarkus:quarkus-maven-plugin:1.8.3.Final:create \\
    -DprojectGroupId=ru.aleksey \\
    -DprojectArtifactId=create-test-maven \\
    -DprojectVersion=my-version \\
    -DclassName="org.my.group.MyResource"
```
we getting created by `gradle.properties` and `pom.xml` files with 1.9.0.CR1 version instead 1.8.3.Final

Changed files:
devtools/maven/src/main/java/io/quarkus/maven/CreateUtils.java

diff --git a/devtools/maven/src/main/java/io/quarkus/maven/CreateUtils.java b/devtools/maven/src/main/java/io/quarkus/maven/CreateUtils.java
index 495267a6a7d..e1d207ef041 100644
--- a/devtools/maven/src/main/java/io/quarkus/maven/CreateUtils.java
+++ b/devtools/maven/src/main/java/io/quarkus/maven/CreateUtils.java
@@ -85,7 +85,7 @@ static QuarkusPlatformDescriptor resolvePlatformDescriptor(final String bomGroup
                 DefaultArtifactVersion pluginVersion = new DefaultArtifactVersion(baseVersion);
                 int majorVer = pluginVersion.getMajorVersion();
                 int minorVer = pluginVersion.getMinorVersion();
-                version = "[" + majorVer + "." + minorVer + "-alpha, " + majorVer + "." + (minorVer + 1) + ")";
+                version = "[" + majorVer + "." + minorVer + "-alpha, " + majorVer + "." + (minorVer + 1) + "-alpha)";
             }
         }
Repository: quarkusio/quarkus
Issue: Reduce error logging in vertx proxy address forwarding

I see a error log when an ipv6 address of the condensed format  `2001:db8:85a3:8d3:1319:8a2e:370::` is used. (Basically ends in a ::)
> Failed to parse a port from forwarded-type headers

https://github.com/quarkusio/quarkus/blob/9d5f82255ee8a994bcffd16c0cbcc24edd6ab226/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/ForwardedParser.java#L204

Would a change like https://github.com/bobbyphilip/quarkus/commit/98a52d8b1135470b5ee7bf582fa7316707453a6e, be acceptable to reduce the needless error log?

Changed files:
extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/ForwardedParser.java

diff --git a/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/ForwardedParser.java b/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/ForwardedParser.java
index 995c72ca97c..66441f2e08f 100644
--- a/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/ForwardedParser.java
+++ b/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/ForwardedParser.java
@@ -202,12 +202,14 @@ private SocketAddress parseFor(String forToParse, int defaultPort) {
     }
 
     private int parsePort(String portToParse, int defaultPort) {
-        try {
-            return Integer.parseInt(portToParse);
-        } catch (NumberFormatException ignored) {
-            log.error("Failed to parse a port from \\"forwarded\\"-type headers.");
-            return defaultPort;
+        if (portToParse != null && portToParse.length() > 0) {
+            try {
+                return Integer.parseInt(portToParse);
+            } catch (NumberFormatException ignored) {
+                log.error("Failed to parse a port from \\"forwarded\\"-type headers.");
+            }
         }
+        return defaultPort;
     }
 
     private String appendPrefixToUri(String prefix, String uri) {
Repository: quarkusio/quarkus
Issue: Hibernate ORM extension boot is not holding the @Startup event

**Describe the bug**
There is no guarantee that an event listening for `@Startup` runs strictly after the Hibernate ORM bootstrap.

Clearly the intent should be that all such frameworks have completed initialization, and this gets noticeable if the application code expects - for example - the database schema to have been generated.

As reported on Zulip by @famod 

Changed files:
extensions/hibernate-orm/deployment/src/main/java/io/quarkus/hibernate/orm/deployment/HibernateOrmProcessor.java

diff --git a/extensions/hibernate-orm/deployment/src/main/java/io/quarkus/hibernate/orm/deployment/HibernateOrmProcessor.java b/extensions/hibernate-orm/deployment/src/main/java/io/quarkus/hibernate/orm/deployment/HibernateOrmProcessor.java
index d17262f18cb..27833a72c03 100644
--- a/extensions/hibernate-orm/deployment/src/main/java/io/quarkus/hibernate/orm/deployment/HibernateOrmProcessor.java
+++ b/extensions/hibernate-orm/deployment/src/main/java/io/quarkus/hibernate/orm/deployment/HibernateOrmProcessor.java
@@ -95,6 +95,7 @@
 import io.quarkus.deployment.builditem.HotDeploymentWatchedFileBuildItem;
 import io.quarkus.deployment.builditem.LaunchModeBuildItem;
 import io.quarkus.deployment.builditem.LogCategoryBuildItem;
+import io.quarkus.deployment.builditem.ServiceStartBuildItem;
 import io.quarkus.deployment.builditem.SystemPropertyBuildItem;
 import io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem;
 import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
@@ -506,16 +507,17 @@ public void build(HibernateOrmRecorder recorder, HibernateOrmConfig hibernateOrm
 
     @BuildStep
     @Record(RUNTIME_INIT)
-    public void startPersistenceUnits(HibernateOrmRecorder recorder, BeanContainerBuildItem beanContainer,
+    public ServiceStartBuildItem startPersistenceUnits(HibernateOrmRecorder recorder, BeanContainerBuildItem beanContainer,
             List<JdbcDataSourceBuildItem> dataSourcesConfigured,
             JpaEntitiesBuildItem jpaEntities, List<NonJpaModelBuildItem> nonJpaModels,
             List<HibernateOrmIntegrationRuntimeConfiguredBuildItem> integrationsRuntimeConfigured,
             List<JdbcDataSourceSchemaReadyBuildItem> schemaReadyBuildItem) throws Exception {
-        if (!hasEntities(jpaEntities, nonJpaModels)) {
-            return;
+        if (hasEntities(jpaEntities, nonJpaModels)) {
+            recorder.startAllPersistenceUnits(beanContainer.getValue());
         }
 
-        recorder.startAllPersistenceUnits(beanContainer.getValue());
+        return new ServiceStartBuildItem("Hibernate ORM");
+
     }
 
     @BuildStep
Repository: quarkusio/quarkus
Issue: invalid warning in ResteasyCommonProcessor when using rest-client

**Describe the bug**
I created a QuarkusMain application that only uses the rest-client with rest client jackson support.
the application works as expected, except it prints this warning:
```
[WARNING] [io.quarkus.resteasy.common.deployment.ResteasyCommonProcessor] Quarkus detected the need of REST JSON support but you have not provided the necessary JSON extension for this. You can visit https://quarkus.io/guides/rest-json for more information on how to set one.
```

**Expected behavior**
there should be no warning because this is a valid situation.
if the warning was valid, (because we are lacking json support), then the link should be `https://quarkus.io/guides/rest-client `

**Actual behavior**
it prints a warning, plus the link is incorrect for rest-clients


**To Reproduce**
create an application such as https://quarkus.io/guides/rest-client
migrate it to be `QuarkusMain` application, and replace the extensions by `rest-client` and the `rest-client-jackson`.
build and execute.

Changed files:
extensions/rest-client-jsonb/deployment/src/main/java/io/quarkus/restclient/jsonb/deployment/RestClientJsonbProcessor.java
extensions/rest-client-jackson/deployment/src/main/java/io/quarkus/restclient/jackson/deployment/RestClientJacksonProcessor.java

diff --git a/extensions/rest-client-jackson/deployment/src/main/java/io/quarkus/restclient/jackson/deployment/RestClientJacksonProcessor.java b/extensions/rest-client-jackson/deployment/src/main/java/io/quarkus/restclient/jackson/deployment/RestClientJacksonProcessor.java
index c29b19c7b92..f35102a8bb1 100644
--- a/extensions/rest-client-jackson/deployment/src/main/java/io/quarkus/restclient/jackson/deployment/RestClientJacksonProcessor.java
+++ b/extensions/rest-client-jackson/deployment/src/main/java/io/quarkus/restclient/jackson/deployment/RestClientJacksonProcessor.java
@@ -15,5 +15,6 @@ void build(BuildProducer<FeatureBuildItem> feature,
         feature.produce(new FeatureBuildItem(Feature.REST_CLIENT_JACKSON));
 
         capability.produce(new CapabilityBuildItem(Capability.REST_JACKSON));
+        capability.produce(new CapabilityBuildItem(Capability.RESTEASY_JSON));
     }
 }
diff --git a/extensions/rest-client-jsonb/deployment/src/main/java/io/quarkus/restclient/jsonb/deployment/RestClientJsonbProcessor.java b/extensions/rest-client-jsonb/deployment/src/main/java/io/quarkus/restclient/jsonb/deployment/RestClientJsonbProcessor.java
index 6cbcf14e3ea..3e0a885e37a 100755
--- a/extensions/rest-client-jsonb/deployment/src/main/java/io/quarkus/restclient/jsonb/deployment/RestClientJsonbProcessor.java
+++ b/extensions/rest-client-jsonb/deployment/src/main/java/io/quarkus/restclient/jsonb/deployment/RestClientJsonbProcessor.java
@@ -15,5 +15,6 @@ void build(BuildProducer<FeatureBuildItem> feature,
         feature.produce(new FeatureBuildItem(Feature.REST_CLIENT_JSONB));
 
         capability.produce(new CapabilityBuildItem(Capability.REST_JSONB));
+        capability.produce(new CapabilityBuildItem(Capability.RESTEASY_JSON));
     }
 }
Repository: quarkusio/quarkus
Issue: 1.9.1 throws Response has already been written from RouteFilter

**Describe the bug**
After updating from 1.8.3.Final to 1.9.1.Final our tests have started to throw this to the logs:

```
2020-10-30 17:33:39,400 ERROR [io.qua.mut.run.MutinyInfrastructure] (vert.x-eventloop-thread-9) Mutiny had to drop the following exception: java.lang.IllegalStateException: Response has already been written
	at io.vertx.core.http.impl.HttpServerResponseImpl.end(HttpServerResponseImpl.java:376)
	at io.vertx.core.http.impl.HttpServerResponseImpl.end(HttpServerResponseImpl.java:365)
	at io.vertx.core.http.impl.HttpServerResponseImpl.end(HttpServerResponseImpl.java:421)
	at io.quarkus.vertx.http.runtime.security.HttpSecurityRecorder$2$1$1.accept(HttpSecurityRecorder.java:75)
	at io.quarkus.vertx.http.runtime.security.HttpSecurityRecorder$2$1$1.accept(HttpSecurityRecorder.java:72)
```

This happens in a ``@RouteFilter(401)`` when it calls ``rc.next()``. This does not happen with earlier versions.

**Expected behavior**
No such error should be output.

**Actual behavior**


**To Reproduce**
```java
    @RouteFilter(401)
    void oasAcceptHeaderMangler(RoutingContext rc) {
        if (rc.normalisedPath().endsWith("openapi.json")) {
            rc.request().headers().remove("Accept");
            rc.request().headers().add("Accept", "application/json");
        }
        rc.next();
    }
```

We use HttpAuthenticationMechanism and these tests are triggering the failure path:

```java
public Uni<SecurityIdentity> authenticate(RoutingContext routingContext, IdentityProviderManager identityProviderManager) {
...
.onFailure().transform(AuthenticationFailedException::new)
...
```

Changed files:
extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/security/HttpSecurityRecorder.java

diff --git a/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/security/HttpSecurityRecorder.java b/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/security/HttpSecurityRecorder.java
index 3eafc73f2e4..242673cf431 100644
--- a/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/security/HttpSecurityRecorder.java
+++ b/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/security/HttpSecurityRecorder.java
@@ -72,7 +72,9 @@ public void accept(RoutingContext routingContext, Throwable throwable) {
                             authenticator.sendChallenge(event).subscribe().with(new Consumer<Boolean>() {
                                 @Override
                                 public void accept(Boolean aBoolean) {
-                                    event.response().end();
+                                    if (!event.response().ended()) {
+                                        event.response().end();
+                                    }
                                 }
                             }, new Consumer<Throwable>() {
                                 @Override
Repository: quarkusio/quarkus
Issue: Remove FunctionGaugeSupport from the Micrometer extension

This interface is no longer needed with MP Metrics 3.0 dependency

Changed files:
extensions/micrometer/runtime/src/main/java/io/smallrye/metrics/api/FunctionGaugeSupport.java

diff --git a/extensions/micrometer/runtime/src/main/java/io/smallrye/metrics/api/FunctionGaugeSupport.java b/extensions/micrometer/runtime/src/main/java/io/smallrye/metrics/api/FunctionGaugeSupport.java
deleted file mode 100644
index 427a7687768..00000000000
--- a/extensions/micrometer/runtime/src/main/java/io/smallrye/metrics/api/FunctionGaugeSupport.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package io.smallrye.metrics.api;
-
-import java.util.function.Supplier;
-
-import org.eclipse.microprofile.metrics.Gauge;
-import org.eclipse.microprofile.metrics.Tag;
-
-import io.smallrye.common.annotation.Experimental;
-
-/**
- * Temporary tool to support function gauges in 2.4.x even though they become part of the official API in 3.0.
- * This is scheduled to be removed along with the upgrade to SmallRye Metrics 3.0.
- */
-@Experimental("Temporarily backported API from Metrics 3.0 to support it in 2.4.x")
-@Deprecated
-public interface FunctionGaugeSupport {
-
-    <T extends Number> Gauge<T> gauge(String name, Supplier<T> supplier, Tag... tags);
-
-}
Repository: quarkusio/quarkus
Issue: Missing Hazelcast logs after change #15636

## Describe the bug
We use Hazelcast embedded in one of our projects. After upgrading to 1.13.0.Final version we get `"LogManager error of type WRITE_FAILURE: The delayed handler's queue was overrun and log record(s) were lost. Did you forget to configure logging?"` during server startup. All Hazelcast startup logs are lost. I suspect it is related to change https://github.com/quarkusio/quarkus/pull/15636.

Hazelcast is initialized in a producer method. I added some logging into this producer method to see if they are printed however those logs get lost as well.

PS: When I start the project in `dev` mode the logs are printed correctly.

Changed files:
independent-projects/bootstrap/runner/src/main/java/io/quarkus/bootstrap/logging/QuarkusDelayedHandler.java

diff --git a/independent-projects/bootstrap/runner/src/main/java/io/quarkus/bootstrap/logging/QuarkusDelayedHandler.java b/independent-projects/bootstrap/runner/src/main/java/io/quarkus/bootstrap/logging/QuarkusDelayedHandler.java
index b39f29a5d57..74883b44991 100644
--- a/independent-projects/bootstrap/runner/src/main/java/io/quarkus/bootstrap/logging/QuarkusDelayedHandler.java
+++ b/independent-projects/bootstrap/runner/src/main/java/io/quarkus/bootstrap/logging/QuarkusDelayedHandler.java
@@ -23,6 +23,7 @@
 import java.util.logging.ErrorManager;
 import java.util.logging.Formatter;
 import java.util.logging.Handler;
+import java.util.logging.Level;
 import java.util.logging.Logger;
 import org.jboss.logmanager.ExtHandler;
 import org.jboss.logmanager.ExtLogRecord;
@@ -66,6 +67,10 @@ protected void doPublish(final ExtLogRecord record) {
                     publishToNestedHandlers(record);
                     super.doPublish(record);
                 } else {
+                    // until the handler is fully activated, we drop anything below the info level
+                    if (record.getLevel().intValue() < Level.INFO.intValue()) {
+                        return;
+                    }
                     // Determine whether the queue was overrun
                     if (logRecords.size() >= queueLimit) {
                         reportError(
Repository: quarkusio/quarkus
Issue: devtools - BuildFile - possible NPE

https://github.com/quarkusio/quarkus/blob/main/independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/project/buildfile/BuildFile.java#L131

```java
    private boolean isQuarkusExtension(final ArtifactKey key) {
        if (catalog != null) {
            return findInList(catalog.getExtensions(), key).isPresent();
        }
        return isDefinedInRegistry(catalog.getExtensions(), key);
    }
```

`return isDefinedInRegistry(catalog.getExtensions(), key);` would throw NPE for `catalog` if it is reached

Changed files:
independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/project/buildfile/BuildFile.java

diff --git a/independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/project/buildfile/BuildFile.java b/independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/project/buildfile/BuildFile.java
index b96b4a80471..0e352cef901 100644
--- a/independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/project/buildfile/BuildFile.java
+++ b/independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/project/buildfile/BuildFile.java
@@ -17,8 +17,6 @@
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
-import java.util.Objects;
-import java.util.Optional;
 import java.util.Set;
 import java.util.stream.Collectors;
 
@@ -129,10 +127,7 @@ protected void writeToProjectFile(final String fileName, final byte[] content) t
     }
 
     private boolean isQuarkusExtension(final ArtifactKey key) {
-        if (catalog != null) {
-            return findInList(catalog.getExtensions(), key).isPresent();
-        }
-        return isDefinedInRegistry(catalog.getExtensions(), key);
+        return catalog != null ? isDefinedInRegistry(catalog.getExtensions(), key) : false;
     }
 
     private Set<ArtifactKey> getDependenciesKeys() throws IOException {
@@ -142,11 +137,4 @@ private Set<ArtifactKey> getDependenciesKeys() throws IOException {
     public static boolean isDefinedInRegistry(Collection<Extension> registry, final ArtifactKey key) {
         return Extensions.findInList(registry, key).isPresent();
     }
-
-    private static Optional<io.quarkus.registry.catalog.Extension> findInList(
-            Collection<io.quarkus.registry.catalog.Extension> list, final ArtifactKey key) {
-        ArtifactKey k = new ArtifactKey(key.getGroupId(), key.getArtifactId(), key.getClassifier(), key.getType());
-        return list.stream().filter(e -> Objects.equals(e.getArtifact().getKey(), k)).findFirst();
-    }
-
 }
Repository: quarkusio/quarkus
Issue: Jacoco Extension does not report on sub projects as of 1.13.3

Describe the bug
As of 1.13.3.Final a multi-module project only reports on the code coverage of the project running the Quarkus plugin and not all projects included in the app.

Expected behavior
Should report on all coverage of modules in the same project

Actual behavior
As above

To Reproduce
git clone https://github.com/bcluap/quarkus-examples.git
cd quarkus-examples/multi-module
mvn clean verify
look at ./runnable/target/jacoco-report/index.html

If 1.13.2.Final or before is used then the report includes coverage of Module1 and Module2 as well

Configuration
Nothing abnormal.

Screenshots
Run the reproducer

Environment (please complete the following information):
1.13.3

Changed files:
test-framework/jacoco/deployment/src/main/java/io/quarkus/jacoco/deployment/JacocoProcessor.java

diff --git a/test-framework/jacoco/deployment/src/main/java/io/quarkus/jacoco/deployment/JacocoProcessor.java b/test-framework/jacoco/deployment/src/main/java/io/quarkus/jacoco/deployment/JacocoProcessor.java
index bdbc6b480c6..e040fce63c2 100644
--- a/test-framework/jacoco/deployment/src/main/java/io/quarkus/jacoco/deployment/JacocoProcessor.java
+++ b/test-framework/jacoco/deployment/src/main/java/io/quarkus/jacoco/deployment/JacocoProcessor.java
@@ -14,7 +14,6 @@
 import org.codehaus.plexus.util.StringUtils;
 import org.jacoco.core.instr.Instrumenter;
 import org.jacoco.core.runtime.OfflineInstrumentationAccessGenerator;
-import org.jacoco.report.MultiSourceFileLocator;
 import org.jboss.jandex.ClassInfo;
 
 import io.quarkus.bootstrap.model.AppArtifactKey;
@@ -103,11 +102,10 @@ public byte[] apply(String className, byte[] bytes) {
             info.classFiles = classes;
 
             Set<String> sources = new HashSet<>();
-            MultiSourceFileLocator sourceFileLocator = new MultiSourceFileLocator(4);
             if (BuildToolHelper.isMavenProject(targetdir.toPath())) {
                 Set<AppArtifactKey> runtimeDeps = new HashSet<>();
                 for (AppDependency i : curateOutcomeBuildItem.getEffectiveModel().getUserDependencies()) {
-                    runtimeDeps.add(i.getArtifact().getKey());
+                    runtimeDeps.add(new AppArtifactKey(i.getArtifact().getGroupId(), i.getArtifact().getArtifactId()));
                 }
                 LocalProject project = LocalProject.loadWorkspace(targetdir.toPath());
                 runtimeDeps.add(project.getKey());
Repository: quarkusio/quarkus
Issue: RESTEasy Reactive: Chained Sub resources Result in 405 Method not allowed

Describe the bug
Trying to access a chain of sub resources results in a 405 method not allowed. This works perfectly on normal resteasy.

Expected behavior
The sub resources should be located and called

Actual behavior
a 405 is returned

To Reproduce
git clone https://github.com/bcluap/quarkus-examples.git
cd quarkus-examples/resteasy-reactive
mvn clean test

Configuration
Nothing abnormal

Screenshots
Run the reproducer to see failures. Change the pom to non-reactive mode and all tests pass

Environment (please complete the following information):
This is not environment-specific
999-SNAPSHOT and before

Additional context
The project also includes another unrelated bug - uriinfo.getRequestUri.tostring has the query params duplicated


Changed files:
extensions/resteasy-reactive/quarkus-resteasy-reactive/deployment/src/main/java/io/quarkus/resteasy/reactive/server/deployment/ResteasyReactiveProcessor.java

diff --git a/extensions/resteasy-reactive/quarkus-resteasy-reactive/deployment/src/main/java/io/quarkus/resteasy/reactive/server/deployment/ResteasyReactiveProcessor.java b/extensions/resteasy-reactive/quarkus-resteasy-reactive/deployment/src/main/java/io/quarkus/resteasy/reactive/server/deployment/ResteasyReactiveProcessor.java
index 28a8bfc452e..3abf4d6d562 100644
--- a/extensions/resteasy-reactive/quarkus-resteasy-reactive/deployment/src/main/java/io/quarkus/resteasy/reactive/server/deployment/ResteasyReactiveProcessor.java
+++ b/extensions/resteasy-reactive/quarkus-resteasy-reactive/deployment/src/main/java/io/quarkus/resteasy/reactive/server/deployment/ResteasyReactiveProcessor.java
@@ -401,6 +401,15 @@ private boolean hasAnnotation(MethodInfo method, short paramPosition, DotName an
                     toScan.add(classInfo);
                 }
             }
+            //sub resources can also have just a path annotation
+            //if they are 'intermediate' sub resources
+            for (AnnotationInstance instance : index.getAnnotations(ResteasyReactiveDotNames.PATH)) {
+                if (instance.target().kind() == AnnotationTarget.Kind.METHOD) {
+                    MethodInfo method = instance.target().asMethod();
+                    ClassInfo classInfo = method.declaringClass();
+                    toScan.add(classInfo);
+                }
+            }
             while (!toScan.isEmpty()) {
                 ClassInfo classInfo = toScan.poll();
                 if (scannedResources.containsKey(classInfo.name()) ||
Repository: quarkusio/quarkus
Issue: GRPC client stream onMessage and onClose executes on different threads

When calling client grpc service method form blocking code(no matter if its blocking or async client).  Stream close will be executed on worker thread, but on message event will be executed on event-loop thread. So client stream usually closed before able to reads any message

**Expected behavior**
OnMessage and OnClose executed in correct order

**To Reproduce**
https://drive.google.com/file/d/16xdsSuSV4V9pQAJt_HDYoppgqsAGOGoX/view?usp=sharing

Steps to reproduce the behavior:
archive contains single UT that reproduce incorrect behavior.
For more details you will need to debug class `io.grpc.stub.ClientCall.BlockingResponseStream.QueuingListener` to see threads

**Environment (please complete the following information):**
 - Output of `uname -a` or `ver`:  Linux andrii-PC 5.4.0-65-generic #73-Ubuntu SMP Mon Jan 18 17:25:17 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
 - Output of `java -version`:  openjdk version "11.0.9" 2020-10-20
 - GraalVM version (if different from Java):  OpenJDK Runtime Environment GraalVM CE 20.3.0 (build 11.0.9+10-jvmci-20.3-b06)
 - Quarkus version or git rev:  1.11.3
 - Build tool (ie. output of `mvnw --version` or `gradlew --version`): maven 3.6.3 or gradle 6.5.1


Changed files:
extensions/grpc/runtime/src/main/java/io/quarkus/grpc/runtime/supports/IOThreadClientInterceptor.java

diff --git a/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/runtime/supports/IOThreadClientInterceptor.java b/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/runtime/supports/IOThreadClientInterceptor.java
index d4e49736fca..f067033e631 100644
--- a/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/runtime/supports/IOThreadClientInterceptor.java
+++ b/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/runtime/supports/IOThreadClientInterceptor.java
@@ -23,10 +23,19 @@ public void start(Listener<RespT> responseListener, Metadata headers) {
                 super.start(new ForwardingClientCallListener.SimpleForwardingClientCallListener<RespT>(responseListener) {
                     @Override
                     public void onMessage(RespT message) {
+                        runInContextIfNeed(() -> super.onMessage(message));
+                    }
+
+                    @Override
+                    public void onClose(Status status, Metadata trailers) {
+                        runInContextIfNeed(() -> super.onClose(status, trailers));
+                    }
+
+                    private void runInContextIfNeed(Runnable fun) {
                         if (context != null) {
-                            context.runOnContext(unused -> super.onMessage(message));
+                            context.runOnContext(unused -> fun.run());
                         } else {
-                            super.onMessage(message);
+                            fun.run();
                         }
                     }
                 }, headers);
Repository: quarkusio/quarkus
Issue: Weird warn message with the OpenShift extension

Using the OpenShift extension, I now have this:
```
2021-03-10 17:12:56,920 WARN  [io.qua.kub.dep.KubernetesProcessor] (build-56) exposition openshift=Optional.empty
```

I don't think that is normal. It looks like a debug message (and if not, the `Optional.empty` should go).

This is with master, no idea if it ended up in another branch so this needs to be checked.

Changed files:
extensions/kubernetes/vanilla/deployment/src/main/java/io/quarkus/kubernetes/deployment/KubernetesProcessor.java

diff --git a/extensions/kubernetes/vanilla/deployment/src/main/java/io/quarkus/kubernetes/deployment/KubernetesProcessor.java b/extensions/kubernetes/vanilla/deployment/src/main/java/io/quarkus/kubernetes/deployment/KubernetesProcessor.java
index e1fe9b8fc5e..c1c3bbf1e90 100644
--- a/extensions/kubernetes/vanilla/deployment/src/main/java/io/quarkus/kubernetes/deployment/KubernetesProcessor.java
+++ b/extensions/kubernetes/vanilla/deployment/src/main/java/io/quarkus/kubernetes/deployment/KubernetesProcessor.java
@@ -106,8 +106,6 @@ public void build(ApplicationInfoBuildItem applicationInfo,
             throw new RuntimeException("Unable to setup environment for generating Kubernetes resources", e);
         }
 
-        log.warn("exposition openshift=" + openshiftConfig.route.host);
-
         Map<String, Object> config = KubernetesConfigUtil.toMap(kubernetesConfig, openshiftConfig, knativeConfig);
         Set<String> deploymentTargets = kubernetesDeploymentTargets.getEntriesSortedByPriority().stream()
                 .map(DeploymentTargetEntry::getName)
Repository: quarkusio/quarkus
Issue: "quarkus.http.test-timeout" Was removed ? (using 1.12.1.Final)

I have this in my application.properties
# timeout for junit RestAssured / debug
%test.quarkus.http.test-timeout=600s

I'm using : <quarkus.platform.version>1.12.1.Final</quarkus.platform.version>

and now I obtain this in the logs 
2021-03-18 12:47:35,512 WARN  [io.qua.config] (main) Unrecognized configuration key "quarkus.http.test-timeout" was provided; it will be ignored; verify that the dependency extension for this configuration is set or you did not make a typo

In that guide : https://quarkus.io/guides/getting-started-testing
4.2. Controlling HTTP interaction timeout
When using REST Assured in your test, the connection and response timeouts are set to 30 seconds. You can override this setting with the quarkus.http.test-timeout property:

quarkus.http.test-timeout=10s



It should be a false warning: 



Changed files:
extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/HttpBuildTimeConfig.java

diff --git a/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/HttpBuildTimeConfig.java b/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/HttpBuildTimeConfig.java
index 172a24288d0..6bca11e7fe1 100644
--- a/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/HttpBuildTimeConfig.java
+++ b/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/HttpBuildTimeConfig.java
@@ -1,5 +1,7 @@
 package io.quarkus.vertx.http.runtime;
 
+import java.time.Duration;
+
 import io.quarkus.runtime.annotations.ConfigItem;
 import io.quarkus.runtime.annotations.ConfigPhase;
 import io.quarkus.runtime.annotations.ConfigRoot;
@@ -68,4 +70,10 @@ public class HttpBuildTimeConfig {
      */
     @ConfigItem(defaultValue = "true")
     public boolean redirectToNonApplicationRootPath;
+
+    /**
+     * The REST Assured client timeout for testing.
+     */
+    @ConfigItem(defaultValue = "30s")
+    public Duration testTimeout;
 }
Repository: quarkusio/quarkus
Issue: @RouteFilter stopped working with WebSocket requests Quarkus 3.2.0.Final

### Describe the bug

We were migrating from 2.16.7 to 3.2.0.Final

And we have WebSocket interceptor implemented with @RouteFilter

It looks like this:

```java
@RouteFilter
 void authFilter(RoutingContext rc) {
    /// logic to search for websocket header etc
}
```
We use it to intercept GQL Subscriptions and its initial websocket request.
After migration to 3.2.0.Final it stopped intercepting WebSocket for some reason.

### Expected behavior

Intercept all requests as it was in 2.16.7

### Actual behavior

Not intercepting websocket initial request

### How to Reproduce?

_No response_

### Output of `uname -a` or `ver`

_No response_

### Output of `java -version`

17

### GraalVM version (if different from Java)

_No response_

### Quarkus version or git rev

3.2.0.Final

### Build tool (ie. output of `mvnw --version` or `gradlew --version`)

gradle 8.1.1

### Additional information

_No response_

Changed files:
extensions/smallrye-graphql/deployment/src/main/java/io/quarkus/smallrye/graphql/deployment/SmallRyeGraphQLProcessor.java

diff --git a/extensions/smallrye-graphql/deployment/src/main/java/io/quarkus/smallrye/graphql/deployment/SmallRyeGraphQLProcessor.java b/extensions/smallrye-graphql/deployment/src/main/java/io/quarkus/smallrye/graphql/deployment/SmallRyeGraphQLProcessor.java
index d5857405ca9..9a494fdb4df 100644
--- a/extensions/smallrye-graphql/deployment/src/main/java/io/quarkus/smallrye/graphql/deployment/SmallRyeGraphQLProcessor.java
+++ b/extensions/smallrye-graphql/deployment/src/main/java/io/quarkus/smallrye/graphql/deployment/SmallRyeGraphQLProcessor.java
@@ -146,6 +146,8 @@ public class SmallRyeGraphQLProcessor {
     private static final List<String> SUPPORTED_WEBSOCKET_SUBPROTOCOLS = List.of(SUBPROTOCOL_GRAPHQL_WS,
             SUBPROTOCOL_GRAPHQL_TRANSPORT_WS);
 
+    private static final int GRAPHQL_WEBSOCKET_HANDLER_ORDER = -10000;
+
     @BuildStep
     void feature(BuildProducer<FeatureBuildItem> featureProducer) {
         featureProducer.produce(new FeatureBuildItem(Feature.SMALLRYE_GRAPHQL));
@@ -370,7 +372,7 @@ void buildExecutionEndpoint(
                         runBlocking);
 
         HttpRootPathBuildItem.Builder subscriptionsBuilder = httpRootPathBuildItem.routeBuilder()
-                .orderedRoute(graphQLConfig.rootPath, Integer.MIN_VALUE)
+                .orderedRoute(graphQLConfig.rootPath, GRAPHQL_WEBSOCKET_HANDLER_ORDER)
                 .handler(graphqlOverWebsocketHandler);
         routeProducer.produce(subscriptionsBuilder.build());