<AWT Dev> [7u6] Please review my fix for 7184951: [macosx] Exception at java.awt.datatransfer on headless mode (only in GUI session)

Artem Ananiev artem.ananiev at oracle.com
Mon Jul 23 03:41:33 PDT 2012


Hi, Alex,

(cross-posting to awt-dev)

I see several other native methods in CDataTransferer, e.g. 
formatForIndex(). Could you confirm, they cannot be called in the 
headless mode, so there is no need to protect them with headless check, 
please?

Could you also file a SubCR against JDK8 with the idea we discussed 
offline: create a new CHeadlessDataTransferer class to use in the 
headless mode instead of CDataTransferer + headless checks, please?

Thanks,

Artem

On 7/23/2012 1:09 PM, Alexander Zuev wrote:
> Hello,
>
> please review my fix 7184951: [macosx] Exception at
> java.awt.datatransfer on headless mode (only in GUI session)
> CR description can be found here:
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7184951
>
> Webrev with the proposed change can be seen here:
> http://cr.openjdk.java.net/~kizune/7184951/webrev.00
>
> The problem here lays somewhere deep in the Toolkit life cycle on
> Mac OS X - at the time we initialize datatransfer the
> Toolgit.getDefaultToolkit() returns an LWCToolkit instance and later
> when we trying to use it it returns HeadlessToolkit. That's definitely
> wrong but at this stage it's too risky to fiddle with the life cycle
> itself so this is a hotfix that deals with the fallout of the actual
> error. The fix for jdk8 should be different.
>
> With best regards,
> Alex



More information about the awt-dev mailing list