<AWT Dev> [9] Review Request: 8032187 [macosx] The fix for MACOSX_PORT-424 should be reworked
Sergey Bylokhov
Sergey.Bylokhov at oracle.com
Tue Feb 4 13:26:08 PST 2014
On 04.02.2014 23:06, Anthony Petrov wrote:
> Hi Sergey,
>
> From the bug report:
>> After discussion, it was decided to accept MACOSX_PORT-424 as not a
>> defect
>
> Are you saying that user code will start receiving hierarchy events
> related to the internal hierarchy of our LWAWT peers? Why would anyone
> want to process these events and why would we want to post them to
> user code? Is there any way to filter them out?
Documentation of Toolkit.addAWTEventListener() states:
* Adds an AWTEventListener to receive all AWTEvents dispatched
* system-wide that conform to the given <code>eventMask</code>.
....
* Note: event listener use is not recommended for normal
* application use, but are intended solely to support special
* purpose facilities including support for accessibility,
* event record/playback, and diagnostic tracing.
And components intentionally cannot filter them out. All our non trivial
compound components posts lots of such events.
> While I agree that using reflection is a bad idea, but is there any
> other real problem with the original fix for MACOSX_PORT-424? I.e.
> does that fix break anything? If not, can we simply replace usages of
> reflection with AWTAccessor-like mechanism?
The problem not in reflection but in replacing global list of listeners.
>
> --
> best regards,
> Anthony
>
> On 2/4/2014 3:52 PM, Sergey Bylokhov wrote:
>> Hello.
>> Please review the fix for jdk 9.
>> - Initial fix for MACOSX_PORT-424 was reverted back.
>> - delegate.addNotify(),because it was called from
>> delegateContainer.addNotify();
>> - Testcase was updated to filter out events not from the Frame:
>> 84 if (e.getSource() instanceof Frame) {
>> 85 counter++;
>> 86 notify();
>> 87 }
>>
>>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8032187
>> Webrev can be found at:
>> http://cr.openjdk.java.net/~serb/8032187/webrev.00
>>
--
Best regards, Sergey.
More information about the awt-dev
mailing list