[OpenJDK 2D-Dev] OpenJDK Warning hackathon :) - patch 1

Phil Race philip.race at oracle.com
Thu Dec 1 23:31:07 UTC 2011


I'm not sure if the right strategy is to use @SuppressWarnings  so much.
Did you think they were justified, or was it too risky to change ? If the
latter might be better to leave the warnings. Judgement call here.

28 import static 
sun.java2d.opengl.OGLContext.OGLContextCaps.CAPS_EXT_GRAD_SHADER;
29 import static sun.java2d.pipe.BufferedPaints.MULTI_MAX_FRACTIONS;

I think these should go after the rest of the sun.java2d imports
rather than at the top.
Please move these in the various files you added in such order

28 import static sun.java2d.pipe.BufferedOpCodes.RESET_PAINT; 29 import 
static sun.java2d.pipe.BufferedOpCodes.SET_COLOR; 30 import static 
sun.java2d.pipe.BufferedOpCodes.SET_GRADIENT_PAINT; 31 import static 
sun.java2d.pipe.BufferedOpCodes.SET_LINEAR_GRADIENT_PAINT; 32 import 
static sun.java2d.pipe.BufferedOpCodes.SET_RADIAL_GRADIENT_PAINT; 33 
import static sun.java2d.pipe.BufferedOpCodes.SET_TEXTURE_PAINT;

what is the compiler warning that motivated this ?
Was  it really to instead have had just one line ..
import static sun.java2d.pipe.BufferedOpCodes.*;

I filed bug 7117914: Fix javac warnings in src/share/classes/sun/java2d
  for you to use when you are ready and have found a second reviewer ..

-phil.


On 12/1/2011 10:10 AM, Mario Torre wrote:
> Il giorno 01/dic/2011, alle ore 00:29, Roman Kennke ha scritto:
>>> Btw, on the other mailing lists they are also discussing about the warnings day, so I guess I'm not so early ;)
>> Congratulations, it's probably the first time in your life that you're
>> early ;-) Seriously, maybe this comes from the fact that today started 9
>> hours earlier in central Europe than on the US west coast??
>>
>> Cheers, Roman
>>
>
> Ok, here is my latest masterpiece:
>
> http://cr.openjdk.java.net/~neugens/warning-hackaton/webrev.03/
>
> There are a number of warnings I didn't address, I tried to cleanup
> all the SunGraphics2D access and some of the raw type ones.
>
> I used SuppressWarning in a couple of cases and had an opportunity
> to use the new Diamond syntax in another one.
>
> I didn't clean the raw type warning in SunGraphics2D though, since
> I wanted to study this before just suppress the warning, but didn't have
> time yet (I'll probably do in the next days).
>
> There are also a couple of unneeded casts that I removed.
>
> I believe the changes are correct and don't introduce any side effects,
> and are generally safe, but of course, I need some good review
> and testing help since I'm always very conservative when it comes to
> OpenJDK changes.
>
> I'll continue in the next days with some other warnings, for example
> I've seen a bunch of related ones in other packages (like sun.awt), but
> I'll definitely leave them to a future path if no one fixes them before,
> since I really just wanted to clean the java2d namespace for now.
>
> Cheers,
> Mario
> ---
> pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
> Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF
>
> http://www.ladybug-studio.com
>
> IcedRobot: www.icedrobot.org
> Proud GNU Classpath developer: http://www.classpath.org/
> Read About us at: http://planet.classpath.org
> OpenJDK: http://openjdk.java.net/projects/caciocavallo/
>
> Please, support open standards:
> http://endsoftpatents.org/
>
>
>
>




More information about the 2d-dev mailing list