Skip to content

Commit

Permalink
Runtime initialize org.jboss.resteasy.spi.ResourceCleaner
Browse files Browse the repository at this point in the history
org.jboss.resteasy.spi.ResourceCleaner needs to be runtime initialized
both in resteasy-classic and resteasy-reactive.

Follow-up to quarkusio#31452
  • Loading branch information
zakkak committed Aug 14, 2023
1 parent 42cd3ea commit e312dc2
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
import io.quarkus.deployment.builditem.AdditionalApplicationArchiveMarkerBuildItem;
import io.quarkus.deployment.builditem.CombinedIndexBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
import io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ServiceProviderBuildItem;
import io.quarkus.resteasy.reactive.common.runtime.JaxRsSecurityConfig;
import io.quarkus.resteasy.reactive.common.runtime.ResteasyReactiveConfig;
Expand All @@ -77,6 +78,16 @@ public class ResteasyReactiveCommonProcessor {

private static final String PROVIDERS_SERVICE_FILE = "META-INF/services/" + Providers.class.getName();

/**
* ResourceCleaner contains java.lang.ref.Cleaner references which need to get
* runtime initialized.
*/
@BuildStep
public RuntimeInitializedClassBuildItem runtimeInitResourceCleaner() {
return new RuntimeInitializedClassBuildItem(
"org.jboss.resteasy.spi.ResourceCleaner");
}

@BuildStep
void searchForProviders(Capabilities capabilities,
BuildProducer<AdditionalApplicationArchiveMarkerBuildItem> producer) {
Expand Down

0 comments on commit e312dc2

Please sign in to comment.