-
Enhancement
-
Resolution: Unresolved
-
P4
-
jfx11, 9, 10
-
x86_64
-
windows_7
A DESCRIPTION OF THE REQUEST :
javafx.application.Platform.exit() exits FX application and JVM even if permission exitVM is not granted by SecurityManager.
JUSTIFICATION :
It is possible to prevent exiting JVM with SecurityManager with permission exitVM.
However, this permission does not prevent exiting JVM with javafx.application.Platform.exit().
This is inconsistent and unexpected behavior.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Two options:
1) If exitVM is not granted to a class, FX application should throw an exception when an instance of this class calls javafx.application.Platform.exit(). FX application should not terminate.
2) Implement a new target for javafx.util.FXPermission to prevent exiting FX application by calling javafx.application.Platform.exit().
ACTUAL -
When an instance of a class from an external library calls javafx.application.Platform.exit(), FX application and JVM exit even if exitVM is not granted to this instance by SecurityManager.
javafx.application.Platform.exit() exits FX application and JVM even if permission exitVM is not granted by SecurityManager.
JUSTIFICATION :
It is possible to prevent exiting JVM with SecurityManager with permission exitVM.
However, this permission does not prevent exiting JVM with javafx.application.Platform.exit().
This is inconsistent and unexpected behavior.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Two options:
1) If exitVM is not granted to a class, FX application should throw an exception when an instance of this class calls javafx.application.Platform.exit(). FX application should not terminate.
2) Implement a new target for javafx.util.FXPermission to prevent exiting FX application by calling javafx.application.Platform.exit().
ACTUAL -
When an instance of a class from an external library calls javafx.application.Platform.exit(), FX application and JVM exit even if exitVM is not granted to this instance by SecurityManager.