From 1579d17dc709de35400196f3a930541897ab2328 Mon Sep 17 00:00:00 2001 From: Foivos Zakkak Date: Wed, 6 Sep 2023 15:13:00 +0300 Subject: [PATCH] TransformerFactory not "used" with GraalVM for JDK 21 (23.1) javax.xml.transform.TransformerFactory does not appear as used in GraalVM for JDK 21's reports due to inlining. Closes #35676 --- .../it/jpa/postgresql/JPAFunctionalityInGraalITCase.java | 7 ++++--- .../it/jpa/postgresql/JPAFunctionalityInGraalITCase.java | 6 ++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/integration-tests/jpa-postgresql-withxml/src/test/java/io/quarkus/it/jpa/postgresql/JPAFunctionalityInGraalITCase.java b/integration-tests/jpa-postgresql-withxml/src/test/java/io/quarkus/it/jpa/postgresql/JPAFunctionalityInGraalITCase.java index 233fdc491238e9..67c10d711b5673 100644 --- a/integration-tests/jpa-postgresql-withxml/src/test/java/io/quarkus/it/jpa/postgresql/JPAFunctionalityInGraalITCase.java +++ b/integration-tests/jpa-postgresql-withxml/src/test/java/io/quarkus/it/jpa/postgresql/JPAFunctionalityInGraalITCase.java @@ -21,9 +21,10 @@ public void verifyJDKXMLParsersAreIncluded() { report.assertContains(org.postgresql.jdbc.PgSQLXML.class); report.assertContains(UUIDJdbcType.class); - //And finally verify we included the JDK XML by triggering - //io.quarkus.jdbc.postgresql.runtime.graal.SQLXLMFeature - report.assertContains(javax.xml.transform.TransformerFactory.class); + // And finally verify we included "com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl" which is + // the fallback implementation class name used in javax.xml.transform.TransformerFactory.newInstance() + // whose invocation gets triggered when io.quarkus.jdbc.postgresql.runtime.graal.SQLXLMFeature is enabled + report.assertContains("com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl"); } } diff --git a/integration-tests/jpa-postgresql/src/test/java/io/quarkus/it/jpa/postgresql/JPAFunctionalityInGraalITCase.java b/integration-tests/jpa-postgresql/src/test/java/io/quarkus/it/jpa/postgresql/JPAFunctionalityInGraalITCase.java index e6c12a6fc91277..fcdd59cd18c272 100644 --- a/integration-tests/jpa-postgresql/src/test/java/io/quarkus/it/jpa/postgresql/JPAFunctionalityInGraalITCase.java +++ b/integration-tests/jpa-postgresql/src/test/java/io/quarkus/it/jpa/postgresql/JPAFunctionalityInGraalITCase.java @@ -21,9 +21,11 @@ public void verifyJdkXmlParsersHavebeenEcludedFromNative() { report.assertContains(org.postgresql.jdbc.PgSQLXML.class); report.assertContains(UUIDJdbcType.class); - //And finally verify we managed to exclude the JDK XML because of having hinted the analysis - //(See io.quarkus.jdbc.postgresql.runtime.graal.SQLXLMFeature ) + // And finally verify we exclude "com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl" which is + // the fallback implementation class name used in javax.xml.transform.TransformerFactory.newInstance() + // whose invocation gets triggered when io.quarkus.jdbc.postgresql.runtime.graal.SQLXLMFeature is enabled report.assertContainsNot(javax.xml.transform.TransformerFactory.class); + report.assertContainsNot("com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl"); } }