Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TransformerFactory not "used" with GraalVM for JDK 21 (23.1) #35780

Merged
merged 1 commit into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -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);
yrodiere marked this conversation as resolved.
Show resolved Hide resolved
report.assertContainsNot("com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl");
}

}
Loading