RFR: 8350685: java/lang/System/SecurityManagerWarnings.java fails with --enable-preview

Alan Bateman alanb at openjdk.org
Tue Mar 4 19:42:59 UTC 2025


On Mon, 3 Mar 2025 13:33:05 GMT, Sean Mullan <mullan at openjdk.org> wrote:

> Please review this fix to a test that fails when run with --enable-preview. This fix is to add all the necessary utility classes imported by the test to the JAR file, and not just the test classes.

The core reflection used by the launcher can provoke linkage errors. Same thing happens in other usages when looking for constructors or methods.  That said, it does appear that this test creates a JAR file containing classes with dangling references. Changing the change to launch a helper class rather than launching SecurityManagerWarnings, and adding the helper to the JAR file, would avoid this.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/23864#issuecomment-2698727500


More information about the core-libs-dev mailing list