RFR: 8307779: Relax the java.awt.Robot specification
Alexander Zvegintsev
azvegint at openjdk.org
Tue May 9 20:18:18 UTC 2023
On Tue, 9 May 2023 16:05:15 GMT, Alexander Zvegintsev <azvegint at openjdk.org> wrote:
>> src/java.desktop/share/classes/java/awt/Robot.java line 640:
>>
>>> 638: * a new permission from the user on applicable platforms.
>>> 639: */
>>> 640: public void revokeScreenCapturePermission() {
>>
>> I do not understand why we need this method.
>> Also we are separating spec. relaxation into this bug / PR
>> which BTW means it needs a new bug ID.
>> But this would be a new API, so it would need to go along with the code that implements it.
>> Perhaps that's why you added the default method below .. but it isn't really the same thing.
>
>> I do not understand why we need this method.
>
> We need it in order to be able to revoke the saved permission.
>
> For example, it may be necessary if the user has two monitors, but the user only allowed access to one of them.
> If he later decides to get a screen capture of two monitors, with the current implementation it will be impossible to do so without this method.
>
> Alternatively, we can replace it with a system property that says should we keep the permission or not.
> It is discussed here https://github.com/openjdk/jdk/pull/13803#issuecomment-1540255849
>
>> it needs a new bug ID.
>
> done
Updated according to your comments.
I still left `revokeScreenCapturePermission` here for now, so that its documentation can be easily compared and aligned with the other documentation changes.
After finalization it will be moved to #13803 (if we decide to keep the method)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13809#discussion_r1189089254
More information about the client-libs-dev
mailing list