From d1a25d8088003df88fd5ccae795511bc09a5c45a Mon Sep 17 00:00:00 2001 From: Foivos Zakkak Date: Mon, 1 Jul 2024 14:40:31 +0300 Subject: [PATCH] Revert "Register `java.sql.*isClosed` methods for reflection" This reverts commit 8b90462b4c1f79bbc46da239931d33c8ad1ed506. The need for these additional registrations has been handled in upstream GraalVM with https://github.com/oracle/graal/pull/9184 so they are no longer needed. Closes https://github.com/quarkusio/quarkus/issues/41283 --- .../agroal/deployment/AgroalProcessor.java | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/extensions/agroal/deployment/src/main/java/io/quarkus/agroal/deployment/AgroalProcessor.java b/extensions/agroal/deployment/src/main/java/io/quarkus/agroal/deployment/AgroalProcessor.java index 3e360794ef00c..dd17a2b487338 100644 --- a/extensions/agroal/deployment/src/main/java/io/quarkus/agroal/deployment/AgroalProcessor.java +++ b/extensions/agroal/deployment/src/main/java/io/quarkus/agroal/deployment/AgroalProcessor.java @@ -2,10 +2,7 @@ import static io.quarkus.deployment.Capability.OPENTELEMETRY_TRACER; -import java.sql.Connection; import java.sql.Driver; -import java.sql.ResultSet; -import java.sql.Statement; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -63,7 +60,6 @@ import io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem; import io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBundleBuildItem; import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem; -import io.quarkus.deployment.builditem.nativeimage.ReflectiveMethodBuildItem; import io.quarkus.deployment.pkg.builditem.CurateOutcomeBuildItem; import io.quarkus.maven.dependency.ArtifactKey; import io.quarkus.narayana.jta.deployment.NarayanaInitBuildItem; @@ -425,15 +421,4 @@ void registerRowSetSupport( "com.sun.rowset.providers.RIOptimisticProvider", "com.sun.rowset.providers.RIXMLProvider").build()); } - - /** - * Required with GraalVM for JDK 23 and up - */ - @BuildStep() - List registerIsClosedMethod() { - return List.of( - new ReflectiveMethodBuildItem(Statement.class.getName(), "isClosed", new Class[0]), - new ReflectiveMethodBuildItem(Connection.class.getName(), "isClosed", new Class[0]), - new ReflectiveMethodBuildItem(ResultSet.class.getName(), "isClosed", new Class[0])); - } }