Skip to content

Commit

Permalink
Merge pull request #31452 from jerboaa/reasteasy-cleaner-fix
Browse files Browse the repository at this point in the history
Runtime init the cleaner instance in ResourceCleaner
  • Loading branch information
zakkak authored Mar 1, 2023
2 parents 3ffbd93 + 37b5375 commit fe7b6a2
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
import io.quarkus.deployment.builditem.StaticInitConfigBuilderBuildItem;
import io.quarkus.deployment.builditem.SystemPropertyBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
import io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ServiceProviderBuildItem;
import io.quarkus.deployment.util.ServiceUtil;
import io.quarkus.resteasy.common.runtime.ResteasyInjectorFactoryRecorder;
Expand Down Expand Up @@ -343,6 +344,16 @@ void registerNativeImageResources(BuildProducer<ServiceProviderBuildItem> servic
.allProvidersFromClassPath(org.jboss.resteasy.spi.config.ConfigurationFactory.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");
}

private void registerJsonContextResolver(
DotName jsonImplementation,
DotName jsonContextResolver,
Expand Down

0 comments on commit fe7b6a2

Please sign in to comment.