On Fri, 28 Jun 2024 18:22:36 GMT, Phil Race <p...@openjdk.org> wrote:
>> 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. Thanks for the correction about "SecurityException" not being deprecated. I still think that for this PR, we should not throw an exception, since we A) don't specify it to do so, and B) don't do that on macOS in a nearly identical situation. We could consider a future RFE to change the spec (and maybe the behavior). ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/1490#discussion_r1659169563