Skip to content

Commit 9507ea4

Browse files
8264140: Add -Djava.security.manager=allow to JavaFX tests calling setSecurityManager
8234175: Remove obsolete ServiceWithSecurityManagerTest unit test Reviewed-by: arapte
1 parent 2fd5092 commit 9507ea4

File tree

2 files changed

+11
-128
lines changed

2 files changed

+11
-128
lines changed

build.gradle

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,10 @@ try {
622622
def jdkVersionInfo = parseJavaVersion(ver)
623623
defineProperty("jdkVersion", jdkVersionInfo[0])
624624
defineProperty("jdkBuildNumber", jdkVersionInfo[1])
625+
626+
// Define global properties based on the version of Java
627+
def status = compareJdkVersion(jdkVersion, "12")
628+
ext.jdk12OrLater = (status >= 0)
625629
}
626630
}
627631
} finally {
@@ -3456,6 +3460,9 @@ project(":web") {
34563460
dependsOn webArchiveJar
34573461
def testResourceDir = file("$buildDir/testing/resources")
34583462
jvmArgs "-DWEB_ARCHIVE_JAR_TEST_DIR=$testResourceDir"
3463+
if (jdk12OrLater) {
3464+
systemProperty 'java.security.manager', 'allow'
3465+
}
34593466
}
34603467

34613468
task compileJavaDOMBinding()
@@ -3832,6 +3839,10 @@ project(":systemTests") {
38323839
systemProperty "ClipShapeTest.numTests", rootProject.getProperty("ClipShapeTest.numTests")
38333840
}
38343841

3842+
if (jdk12OrLater) {
3843+
systemProperty 'java.security.manager', 'allow'
3844+
}
3845+
38353846
if (!IS_USE_ROBOT) {
38363847
// Disable all robot-based visual tests
38373848
exclude("test/robot/**");

modules/javafx.graphics/src/test/java/test/javafx/concurrent/ServiceWithSecurityManagerTest.java

Lines changed: 0 additions & 128 deletions
This file was deleted.

0 commit comments

Comments
 (0)