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..

--
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



Reply via email to