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 233fdc491238e..e2bf1e3437dbe 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,13 @@ 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. + // We cannot use class javax.xml.transform.TransformerFactory directly since delegation to + // the implementation might get inlined, thus resulting in 'javax.xml.transform.TransformerFactory' + // not showing up as a used class in the reports (due to '-H:+InlineBeforeAnalysis'). + 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 e6c12a6fc9127..158945098ab53 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,14 @@ 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. + // We cannot only use class javax.xml.transform.TransformerFactory directly since delegation to + // the implementation might get inlined, thus resulting in 'javax.xml.transform.TransformerFactory' + // not showing up as a used class in the reports (due to '-H:+InlineBeforeAnalysis'). report.assertContainsNot(javax.xml.transform.TransformerFactory.class); + report.assertContainsNot("com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl"); } }