<AWT Dev>  Review Request: 8074757 Remove java.awt.Toolkit methods which return peer types
Alan.Bateman at oracle.com
Fri Apr 3 16:40:28 UTC 2015
On 02/04/2015 16:15, Sergey Bylokhov wrote:
> Please review the fix for jdk 9.
> There are a number of public methods in the java.awt.Toolkit class,
> which reference the unsupported java.awt.dnd.peer and java.awt.peer
> There is a decision to remove these references as described:
> Changes description:
> - All such methods were moved from Toolkit.java to the
> ComponentFactory.java. Note that all our toolkits implement
> ComponentFactory interface.
> - HToolkit, HeadlessToolkit, SunToolkit were cleared because they
> have the same implementation of these methods as in ComponentFactory.
> - The questionable moment is that I throw an AWTError in a some
> places if a default toolkit not implements ComponentFactory interface.
> Bug: https://bugs.openjdk.java.net/browse/JDK-8074757
> Webrev can be found at:
The removal of the methods from Toolkit look good to me.
On the point about AWTError then I assume that this would only happen a
special build, maybe an untested port. Or maybe there are other way to
configure AWT to use an alternative toolkit implementation at runtime?
More information about the awt-dev