<AWT Dev> [10] Review Request: 8183518 Premature deprecation of Event/InputEvent/KeyEvent in Java 9

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

<AWT Dev> [10] Review Request: 8183518 Premature deprecation of Event/InputEvent/KeyEvent in Java 9

Sergey Bylokhov
Hello.
Please review the fix for jdk10.

Bug: https://bugs.openjdk.java.net/browse/JDK-8183518
Webrev can be found at: http://cr.openjdk.java.net/~serb/8183518/webrev.00

In jdk9 the list of input events, which have an extended equivalent,
were marked as deprecated. But there is some API which works with the
old version of events only. In the fix the new method is added:
Toolkit.getMenuShortcutKeyMaskEx()
This method works in the same way as old getMenuShortcutKeyMask() but
returns the new extended mask.

In the fix I have replaced most usages of the old method, except the
places where it is used with ActionEvent, which has its own masks(the
same as old input event), and currently has no extended modifiers(see [1]).

CSR will be filed after the technical review.


[1] https://bugs.openjdk.java.net/browse/JDK-8186024


--
Best regards, Sergey.
Reply | Threaded
Open this post in threaded view
|

Re: <AWT Dev> [10] Review Request: 8183518 Premature deprecation of Event/InputEvent/KeyEvent in Java 9

prasanta sadhukhan
Hi Sergey,

Don't we need to remove

@SuppressWarnings("deprecation")

from BasicComboPopup and BasicGraphicsUtils?

Regards
Prasanta
On 11/22/2017 4:16 AM, Sergey Bylokhov wrote:

> Hello.
> Please review the fix for jdk10.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8183518
> Webrev can be found at:
> http://cr.openjdk.java.net/~serb/8183518/webrev.00
>
> In jdk9 the list of input events, which have an extended equivalent,
> were marked as deprecated. But there is some API which works with the
> old version of events only. In the fix the new method is added:
> Toolkit.getMenuShortcutKeyMaskEx()
> This method works in the same way as old getMenuShortcutKeyMask() but
> returns the new extended mask.
>
> In the fix I have replaced most usages of the old method, except the
> places where it is used with ActionEvent, which has its own masks(the
> same as old input event), and currently has no extended modifiers(see
> [1]).
>
> CSR will be filed after the technical review.
>
>
> [1] https://bugs.openjdk.java.net/browse/JDK-8186024
>
>

Reply | Threaded
Open this post in threaded view
|

Re: <AWT Dev> [10] Review Request: 8183518 Premature deprecation of Event/InputEvent/KeyEvent in Java 9

Sergey Bylokhov
Thank you for review.
Yes, it can be removed:
http://cr.openjdk.java.net/~serb/8183518/webrev.01

On 22/11/2017 03:09, Prasanta Sadhukhan wrote:

> Hi Sergey,
>
> Don't we need to remove
>
> @SuppressWarnings("deprecation")
>
> from BasicComboPopup and BasicGraphicsUtils?
>
> Regards
> Prasanta
> On 11/22/2017 4:16 AM, Sergey Bylokhov wrote:
>> Hello.
>> Please review the fix for jdk10.
>>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8183518
>> Webrev can be found at:
>> http://cr.openjdk.java.net/~serb/8183518/webrev.00
>>
>> In jdk9 the list of input events, which have an extended equivalent,
>> were marked as deprecated. But there is some API which works with the
>> old version of events only. In the fix the new method is added:
>> Toolkit.getMenuShortcutKeyMaskEx()
>> This method works in the same way as old getMenuShortcutKeyMask() but
>> returns the new extended mask.
>>
>> In the fix I have replaced most usages of the old method, except the
>> places where it is used with ActionEvent, which has its own masks(the
>> same as old input event), and currently has no extended modifiers(see
>> [1]).
>>
>> CSR will be filed after the technical review.
>>
>>
>> [1] https://bugs.openjdk.java.net/browse/JDK-8186024
>>
>>
>


--
Best regards, Sergey.
Reply | Threaded
Open this post in threaded view
|

Re: <AWT Dev> [10] Review Request: 8183518 Premature deprecation of Event/InputEvent/KeyEvent in Java 9

prasanta sadhukhan
looks good to me. I guess, bugid can be added to test.

Regards
Prasanta
On 11/22/2017 9:57 PM, Sergey Bylokhov wrote:

> Thank you for review.
> Yes, it can be removed:
> http://cr.openjdk.java.net/~serb/8183518/webrev.01
>
> On 22/11/2017 03:09, Prasanta Sadhukhan wrote:
>> Hi Sergey,
>>
>> Don't we need to remove
>>
>> @SuppressWarnings("deprecation")
>>
>> from BasicComboPopup and BasicGraphicsUtils?
>>
>> Regards
>> Prasanta
>> On 11/22/2017 4:16 AM, Sergey Bylokhov wrote:
>>> Hello.
>>> Please review the fix for jdk10.
>>>
>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8183518
>>> Webrev can be found at:
>>> http://cr.openjdk.java.net/~serb/8183518/webrev.00
>>>
>>> In jdk9 the list of input events, which have an extended equivalent,
>>> were marked as deprecated. But there is some API which works with
>>> the old version of events only. In the fix the new method is added:
>>> Toolkit.getMenuShortcutKeyMaskEx()
>>> This method works in the same way as old getMenuShortcutKeyMask()
>>> but returns the new extended mask.
>>>
>>> In the fix I have replaced most usages of the old method, except the
>>> places where it is used with ActionEvent, which has its own
>>> masks(the same as old input event), and currently has no extended
>>> modifiers(see [1]).
>>>
>>> CSR will be filed after the technical review.
>>>
>>>
>>> [1] https://bugs.openjdk.java.net/browse/JDK-8186024
>>>
>>>
>>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: <AWT Dev> [10] Review Request: 8183518 Premature deprecation of Event/InputEvent/KeyEvent in Java 9

Philip Race
+1

-phil

On 11/22/2017 08:39 PM, Prasanta Sadhukhan wrote:

> looks good to me. I guess, bugid can be added to test.
>
> Regards
> Prasanta
> On 11/22/2017 9:57 PM, Sergey Bylokhov wrote:
>> Thank you for review.
>> Yes, it can be removed:
>> http://cr.openjdk.java.net/~serb/8183518/webrev.01
>>
>> On 22/11/2017 03:09, Prasanta Sadhukhan wrote:
>>> Hi Sergey,
>>>
>>> Don't we need to remove
>>>
>>> @SuppressWarnings("deprecation")
>>>
>>> from BasicComboPopup and BasicGraphicsUtils?
>>>
>>> Regards
>>> Prasanta
>>> On 11/22/2017 4:16 AM, Sergey Bylokhov wrote:
>>>> Hello.
>>>> Please review the fix for jdk10.
>>>>
>>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8183518
>>>> Webrev can be found at:
>>>> http://cr.openjdk.java.net/~serb/8183518/webrev.00
>>>>
>>>> In jdk9 the list of input events, which have an extended
>>>> equivalent, were marked as deprecated. But there is some API which
>>>> works with the old version of events only. In the fix the new
>>>> method is added:
>>>> Toolkit.getMenuShortcutKeyMaskEx()
>>>> This method works in the same way as old getMenuShortcutKeyMask()
>>>> but returns the new extended mask.
>>>>
>>>> In the fix I have replaced most usages of the old method, except
>>>> the places where it is used with ActionEvent, which has its own
>>>> masks(the same as old input event), and currently has no extended
>>>> modifiers(see [1]).
>>>>
>>>> CSR will be filed after the technical review.
>>>>
>>>>
>>>> [1] https://bugs.openjdk.java.net/browse/JDK-8186024
>>>>
>>>>
>>>
>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: <AWT Dev> [10] Review Request: 8183518 Premature deprecation of Event/InputEvent/KeyEvent in Java 9

Sergey Bylokhov
Thank you for review.
CSR was filed:
https://bugs.openjdk.java.net/browse/JDK-8192637

On 28/11/2017 12:50, Phil Race wrote:

> +1
>
> -phil
>
> On 11/22/2017 08:39 PM, Prasanta Sadhukhan wrote:
>> looks good to me. I guess, bugid can be added to test.
>>
>> Regards
>> Prasanta
>> On 11/22/2017 9:57 PM, Sergey Bylokhov wrote:
>>> Thank you for review.
>>> Yes, it can be removed:
>>> http://cr.openjdk.java.net/~serb/8183518/webrev.01
>>>
>>> On 22/11/2017 03:09, Prasanta Sadhukhan wrote:
>>>> Hi Sergey,
>>>>
>>>> Don't we need to remove
>>>>
>>>> @SuppressWarnings("deprecation")
>>>>
>>>> from BasicComboPopup and BasicGraphicsUtils?
>>>>
>>>> Regards
>>>> Prasanta
>>>> On 11/22/2017 4:16 AM, Sergey Bylokhov wrote:
>>>>> Hello.
>>>>> Please review the fix for jdk10.
>>>>>
>>>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8183518
>>>>> Webrev can be found at:
>>>>> http://cr.openjdk.java.net/~serb/8183518/webrev.00
>>>>>
>>>>> In jdk9 the list of input events, which have an extended
>>>>> equivalent, were marked as deprecated. But there is some API which
>>>>> works with the old version of events only. In the fix the new
>>>>> method is added:
>>>>> Toolkit.getMenuShortcutKeyMaskEx()
>>>>> This method works in the same way as old getMenuShortcutKeyMask()
>>>>> but returns the new extended mask.
>>>>>
>>>>> In the fix I have replaced most usages of the old method, except
>>>>> the places where it is used with ActionEvent, which has its own
>>>>> masks(the same as old input event), and currently has no extended
>>>>> modifiers(see [1]).
>>>>>
>>>>> CSR will be filed after the technical review.
>>>>>
>>>>>
>>>>> [1] https://bugs.openjdk.java.net/browse/JDK-8186024
>>>>>
>>>>>
>>>>
>>>
>>>
>>
>


--
Best regards, Sergey.