From 3d08fcf0ab17f0dd44738dc3a9faf33431ad78e7 Mon Sep 17 00:00:00 2001 From: Ron Sigal Date: Fri, 18 Jun 2021 17:41:45 -0400 Subject: [PATCH] RESTEasy 4.6.1.Beta9 RESTEasy 4.6.1.Beta9: Red Hat nexus repository RESTEasy 4.6.1.Final / remove Red Hat nexus repository Remove unused properties from pom.xml --- bom/application/pom.xml | 2 +- .../deployment/RestClientProcessor.java | 7 ------- .../rest-client/runtime/pom.xml | 4 ---- .../runtime/QuarkusRestClientBuilder.java | 2 +- .../runtime/RestClientRecorder.java | 20 ------------------- 5 files changed, 2 insertions(+), 33 deletions(-) diff --git a/bom/application/pom.xml b/bom/application/pom.xml index dcaac4c540888..c96b6953b00d1 100644 --- a/bom/application/pom.xml +++ b/bom/application/pom.xml @@ -18,7 +18,7 @@ 1.0.2.1 1.0.11.4 2.3.0.Final - 4.6.0.Final + 4.6.1.Final 0.33.0 1.0.0 0.4.0 diff --git a/extensions/resteasy-classic/rest-client/deployment/src/main/java/io/quarkus/restclient/deployment/RestClientProcessor.java b/extensions/resteasy-classic/rest-client/deployment/src/main/java/io/quarkus/restclient/deployment/RestClientProcessor.java index 69368a6711e28..2f1bf7e5aabca 100644 --- a/extensions/resteasy-classic/rest-client/deployment/src/main/java/io/quarkus/restclient/deployment/RestClientProcessor.java +++ b/extensions/resteasy-classic/rest-client/deployment/src/main/java/io/quarkus/restclient/deployment/RestClientProcessor.java @@ -50,7 +50,6 @@ import io.quarkus.arc.BeanDestroyer; import io.quarkus.arc.deployment.AdditionalBeanBuildItem; import io.quarkus.arc.deployment.BeanArchiveIndexBuildItem; -import io.quarkus.arc.deployment.BeanContainerListenerBuildItem; import io.quarkus.arc.deployment.SyntheticBeanBuildItem; import io.quarkus.arc.deployment.SyntheticBeanBuildItem.ExtendedBeanConfigurator; import io.quarkus.arc.processor.BuiltinScope; @@ -119,12 +118,6 @@ void setupClientBuilder(BuildProducer resources) { resources.produce(new NativeImageResourceBuildItem("META-INF/services/javax.ws.rs.client.ClientBuilder")); } - @Record(ExecutionTime.STATIC_INIT) - @BuildStep - BeanContainerListenerBuildItem fixExtension(RestClientRecorder restClientRecorder) { - return new BeanContainerListenerBuildItem(restClientRecorder.hackAroundExtension()); - } - @BuildStep NativeImageProxyDefinitionBuildItem addProxy() { return new NativeImageProxyDefinitionBuildItem(ResteasyConfiguration.class.getName()); diff --git a/extensions/resteasy-classic/rest-client/runtime/pom.xml b/extensions/resteasy-classic/rest-client/runtime/pom.xml index cab37f9ea57de..da3c7868365ce 100644 --- a/extensions/resteasy-classic/rest-client/runtime/pom.xml +++ b/extensions/resteasy-classic/rest-client/runtime/pom.xml @@ -40,10 +40,6 @@ jboss-interceptors-api_1.2_spec - - org.jboss.resteasy - resteasy-cdi - diff --git a/extensions/resteasy-classic/rest-client/runtime/src/main/java/io/quarkus/restclient/runtime/QuarkusRestClientBuilder.java b/extensions/resteasy-classic/rest-client/runtime/src/main/java/io/quarkus/restclient/runtime/QuarkusRestClientBuilder.java index 57dfa99225b55..2ac9de1a25155 100644 --- a/extensions/resteasy-classic/rest-client/runtime/src/main/java/io/quarkus/restclient/runtime/QuarkusRestClientBuilder.java +++ b/extensions/resteasy-classic/rest-client/runtime/src/main/java/io/quarkus/restclient/runtime/QuarkusRestClientBuilder.java @@ -350,7 +350,7 @@ public T build(Class aClass) throws IllegalStateException, RestClientDefi T proxy = (T) Proxy.newProxyInstance(classLoader, interfaces, new ProxyInvocationHandler(aClass, actualClient, getLocalProviderInstances(), client, getBeanManager())); - ClientHeaderProviders.registerForClass(aClass, proxy); + ClientHeaderProviders.registerForClass(aClass, proxy, getBeanManager()); return proxy; } diff --git a/extensions/resteasy-classic/rest-client/runtime/src/main/java/io/quarkus/restclient/runtime/RestClientRecorder.java b/extensions/resteasy-classic/rest-client/runtime/src/main/java/io/quarkus/restclient/runtime/RestClientRecorder.java index 133f7e3598748..93f61f897b3ba 100644 --- a/extensions/resteasy-classic/rest-client/runtime/src/main/java/io/quarkus/restclient/runtime/RestClientRecorder.java +++ b/extensions/resteasy-classic/rest-client/runtime/src/main/java/io/quarkus/restclient/runtime/RestClientRecorder.java @@ -1,22 +1,17 @@ package io.quarkus.restclient.runtime; -import java.lang.reflect.Field; import java.util.Set; -import javax.enterprise.inject.spi.CDI; import javax.ws.rs.RuntimeType; import org.eclipse.microprofile.rest.client.spi.RestClientBuilderResolver; import org.jboss.resteasy.client.jaxrs.internal.ResteasyClientBuilderImpl; import org.jboss.resteasy.core.providerfactory.ResteasyProviderFactoryImpl; import org.jboss.resteasy.microprofile.client.RestClientBuilderImpl; -import org.jboss.resteasy.microprofile.client.RestClientExtension; import org.jboss.resteasy.plugins.providers.RegisterBuiltin; import org.jboss.resteasy.spi.InjectorFactory; import org.jboss.resteasy.spi.ResteasyProviderFactory; -import io.quarkus.arc.runtime.BeanContainer; -import io.quarkus.arc.runtime.BeanContainerListener; import io.quarkus.runtime.RuntimeValue; import io.quarkus.runtime.annotations.Recorder; @@ -25,21 +20,6 @@ public class RestClientRecorder { public static ResteasyProviderFactory providerFactory; - public BeanContainerListener hackAroundExtension() { - return new BeanContainerListener() { - @Override - public void created(BeanContainer container) { - try { - Field f = RestClientExtension.class.getDeclaredField("manager"); - f.setAccessible(true); - f.set(null, CDI.current().getBeanManager()); - } catch (Exception e) { - throw new RuntimeException(e); - } - } - }; - } - public void setRestClientBuilderResolver() { RestClientBuilderResolver.setInstance(new BuilderResolver()); }