<Swing Dev> [12] Review Request: 8198321 javax/swing/JEditorPane/5076514/bug5076514.java fails

Prasanta Sadhukhan prasanta.sadhukhan at oracle.com
Fri Nov 9 04:26:27 UTC 2018


looks ok.

Regards
Prasanta
On 09-Nov-18 2:34 AM, Sergey Bylokhov wrote:
> Hello.
> Please review the fix for jdk 12.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8198321
> Webrev: http://cr.openjdk.java.net/~serb/8198321/webrev.00
>
> This test verifies that "JEditorPane.copy()" method will trigger
> security check for "accessClipboard" permission. This is the same 
> permission
> which is used for Toolkit.getSystemClipboard() to access the system 
> clipboard.
>
> The problem is that in the headless environment we do not have system 
> clipboard.
> as example the method getSystemClipboard() simply throw 
> HeadlessException.
>
> The "JEditorPane.copy()" will skip security check if the system is 
> headless, and
> will use the Clipboard per-Appcontext.
>
> In the fix the case for headless mode was added.
>



More information about the swing-dev mailing list