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

Artem Ananiev artem.ananiev at oracle.com
Fri Dec 2 11:49:28 UTC 2011


I personally don't mind fixing some minor issues that don't result in 
javac warnings. After all, it's all about cleanup. Of course, it doesn't 
mean we should do massive refactoring and reformatting :)

Note that I'm not a member of Java2D team. Phil has a clearer vision of 
what should or shouldn't be done there.

Thanks,

Artem

On 12/2/2011 3:49 AM, Phil Race wrote:
> On 12/1/2011 3:41 PM, Mario Torre wrote:
>> Il giorno 02/dic/2011, alle ore 00:31, Phil Race ha scritto:
>>> 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.
>> Hi Phil,
>>
>> Yeah, I can leave the warning like I did for the SunGraphics2D itself.
>>
>> I add the suppress warning for a reason in this case, since the API seems
>> to actually use the map in few places, I didn't want to risk for a
>> signature
>> change, and I thought that was not actually really needed after all,
>> but I'm
>> happy to leave the warning until further analysis.
>>
>>> 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
>> Ok, I'll fix with the proper ordering.
>>
>>> 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.*;
>> No compiler warning, it was my eclipse complaining and I though that
>> while at it I could cleanup this too.
>>
> Please revert that, as we are focusing on javac warnings rather than
> other style changes.
>
> -phil.
>
>>> 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 ..
>> Ok so, I'll prepare a patch tomorrow then (it's 1 am now here :) I
>> think Artem
>> (in cc) started to review the patch as well so he could be my second
>> reviewer.
>>
>>
>



More information about the 2d-dev mailing list