<AWT Dev> [9] Review Request: 8074028 Remove API references to java.awt.peer

Phil Race philip.race at oracle.com
Wed Mar 4 19:56:04 UTC 2015


Looks good to me. I like some of the clean up like :

-        if (getPeer() == null) {
+        if (!isDisplayable()) {

which is the same as we've told other folks to do ..

I was initially surprised at just using the field "peer" as it might
be null, but getPeer() just returned "peer" anyway, so no difference there.

-phil.


On 3/4/2015 5:35 AM, Sergey Bylokhov wrote:
> On 04.03.2015 15:51, Alan Bateman wrote:
>> On 04/03/2015 12:37, Sergey Bylokhov wrote:
>>> Hello.
>>> Please review the fix for jdk 9.
>>> There are a number of public API whichreference the unsupported 
>>> java.awt.peer interfaces.
>>>
>>> public java.awt.Component.getPeer() @deprecated 1.1
>>> public java.awt.Font.getPeer() @deprecated 1.1
>>> public java.awt.MenuComponent.getPeer() @deprecated 1.1
>>>
>> I don't know this area so I don't feel qualified to do a thorough 
>> review of the changes. However I welcome the changes, this is long 
>> standing technical debt and important that we address this as part of 
>> the move to modules.
>>
>> I note that Font::getPeer is changed to private, hence something try 
>> to access it outside of the Font class will get an IllegalAccessError 
>> as opposed to NoSuchMethodError for the outright removal in the other 
>> cases. Did you consider renaming to something else, say private 
>> FontPeer getFontPeer so that it is consistent with the removal of the 
>> other two methods?
> Make sense, I will update the fix.
>
>> I note that you might not have caught all tests but I would assume 
>> that any missed tests should fail. Perhaps there are other failures 
>> that are potentially hiding tests using getPeer?
> At least I fixed most(if not all) tests, which were passed before the 
> fix and fails after
>
>>
>> -Alan
>>
>
>



More information about the awt-dev mailing list