<AWT Dev> [8] Review request for 8022184 - JDK8 java.awt Static and Raw type warnings fix
Artem Ananiev
artem.ananiev at oracle.com
Mon Sep 2 05:56:21 PDT 2013
Hi, Kalyan,
the new version of the fix looks fine. I put it to cr.openjdk.java.net:
http://cr.openjdk.java.net/~art/srikalyc/8022184.02
Thanks for addressing all the reviewers' comments!
The changes are pushed to awt integration forest:
http://hg.openjdk.java.net/jdk8/awt/jdk/rev/6ffa2680e139
Thanks,
Artem
On 8/28/2013 11:00 AM, srikalyan chandrashekar wrote:
> On 8/27/13 1:26 AM, Artem Ananiev wrote:
>> Hi, Kalyan,
>>
>> On 8/27/2013 11:02 AM, srikalyan chandrashekar wrote:
>>> Artem these explicit casts existed and is now redundant because the
>>> warnings are fixed
>>> For Ex: 1.Class<SomeClass> obj = ....
>>> 2.obj = cl.newInstance();
>>>
>>> Explicit cast is not required in the line 2 because type is now known
>>> due to fix. There could potentially be many such do you want them to be
>>> identified and fixed as part of this effort? The thing is we need to
>>> look around warning areas a little bit..
>>
>> I don't think we should fix all the possible javac warnings as a part
>> of 8022184 - there are tons of them! However, if you touch a line, it
>> seems reasonable to fix adjacent lines as well. For example, in case
>> #1, "Class geCls" is changed to "Class<GraphicsEnvironment> geCls", so
>> we do know that geCls.newInstance() returns a GraphicsEnvironment
>> object and the class cast is not required.
> Hi Artem ,i glanced through usages of all such variables and made fixes
> , here's is the renewed link
> <https://github.com/srikalyc/JDKfixes/blob/master/java.awt.static_raw_webrev_new27Aug2013.zip>
> .
>
> --
> Thanks
> kalyan
>
>
>>
>> Thanks,
>>
>> Artem
>>
>>> --
>>> Thanks
>>> kalyan
>>>
>>> On 8/26/13 6:39 AM, Artem Ananiev wrote:
>>>>
>>>> On 8/23/2013 9:24 PM, srikalyan chandrashekar wrote:
>>>>> Antony, Thanks for the review. Here's the renewed link
>>>>> <https://github.com/srikalyc/JDKfixes/blob/master/java.awt.static_raw_webrev_new.zip>
>>>>>
>>>>>
>>>>> covering the gaps.
>>>>
>>>> Here is the updated link at cr.openjdk.java.net:
>>>>
>>>> http://cr.openjdk.java.net/~art/srikalyc/8022184.01/
>>>>
>>>> A few comments:
>>>>
>>>> 1. GraphicsEnvironment.java:109 - class cast is redundant
>>>>
>>>> 2. KeyboardFocusManager.java:2655 - class cast is redundant
>>>>
>>>> 3. KeyboardFocusManager.java:2985 - class cast is redundant
>>>>
>>>> 4. DefaultKeyboardFocusManager.java:816 - class cast is redundant
>>>>
>>>> 5. DefaultKeyboardFocusManager.java:1067 - class cast is redundant
>>>>
>>>> Thanks,
>>>>
>>>> Artem
>>>>
>>>>> --
>>>>> Thanks
>>>>> kalyan
>>>>>
>>>>> On 8/23/13 3:44 AM, Anthony Petrov wrote:
>>>>>> Hi Srikalyan,
>>>>>>
>>>>>> Thanks for fixing the warnings. A couple of comments:
>>>>>>
>>>>>> src/share/classes/java/awt/KeyboardFocusManager.java
>>>>>>> 3065 proxyActive = (Field)
>>>>>>> AccessController.doPrivileged(new PrivilegedAction<Field>() {
>>>>>>
>>>>>> I suppose an explicit type-cast may now be removed from here.
>>>>>>
>>>>>>
>>>>>> src/share/classes/java/awt/WaitDispatchSupport.java
>>>>>>> 227 AccessController.doPrivileged(new PrivilegedAction<Object>() {
>>>>>>
>>>>>> Usually Void is used instead of Object if we know that we don't use
>>>>>> the return value.
>>>>>>
>>>>>> Otherwise the fix looks good to me.
>>>>>>
>>>>>> --
>>>>>> best regards,
>>>>>> Anthony
>>>>>>
>>>>>> On 08/22/2013 08:40 PM, Artem Ananiev wrote:
>>>>>>>
>>>>>>> On 8/22/2013 8:25 PM, srikalyan chandrashekar wrote:
>>>>>>>> Hi team , could someone review the fix
>>>>>>>> Bug : https://jbs.oracle.com/bugs/browse/JDK-8022184
>>>>>>>
>>>>>>> Here is the right link visible for everyone:
>>>>>>>
>>>>>>> http://bugs.sun.com/view_bug.do?bug_id=8022184
>>>>>>>
>>>>>>>> Webrev :
>>>>>>>> https://github.com/srikalyc/JDKfixes/blob/master/java.awt.static_raw_webrev.zip
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> For convenient reviewing, I put it to cr.openjdk.java.net:
>>>>>>>
>>>>>>> http://cr.openjdk.java.net/~art/srikalyc/8022184/
>>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>> Artem
>>>>>>>
>>>>>>>> Fix : static and raw type warnings fix for java.awt
>>>>>>>> classes
>>>>>>>>
>>>>>
>>>
>
More information about the awt-dev
mailing list