On Fri, 28 Jun 2024 18:07:52 GMT, Alexander Zvegintsev <azveg...@openjdk.org> wrote:
>> Since `SecurityException` is deprecated, we should not throw that. >> >> In a similar situation on macOS (user has not enabled screen capture), we >> return a blank (all black) image, so I think that's what we would do here. > > Updated to return a blank image if permission is not granted. > Since `SecurityException` is deprecated, we should not throw that. > > In a similar situation on macOS (user has not enabled screen capture), we > return a blank (all black) image, so I think that's what we would do here. No, SecurityException is NOT deprecated and there are no plans to deprecate it. https://download.java.net/java/early_access/jdk23/docs/api/java.base/java/lang/SecurityException.html#%3Cinit%3E() This kind of platform reason for a "SecurityException" is precisely why it isn't deprecated even though the Java SecurityManager is deprecated. ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/1490#discussion_r1659151356