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

Phil Race philip.race at oracle.com
Fri Dec 2 20:07:11 UTC 2011

I'll leave it to Jim to decide if he still would like the static imports.
I do see his point that SurfaceData and SG2D are so inter-related the 
could almost as easily be on the SD class so it would look neater to be able
to use them as if it were that way.

If you aren't sure that HashMap<String, int[]>  is OK then do leave it alone
since erring on the side of caution is one of the rules for this exercise.
But maybe Jim can be more sure about this for you.

So I'm OK with the rest of changes and however you and Jim resolve the
above issues.


On 12/2/2011 6:58 AM, Mario Torre wrote:
> 2011/12/2 Jim Graham<james.graham at oracle.com>:
>> For GraphicsPrimitive, can't we determine a decent specific type for the
>> traceMap to avoid having to suppress the warnings?
>> And looking through the rest of the changes, I think I'd support an SG2D.*
>> static import in any of the pipelines and loops as well...
>>                         ...jim
> Ok, I reverted the includes, and I fixed the Path2D with the small duplication
> rather than the suppress warning, actually I think is indeed better that way.
> I don't fully agree with the static import, since they tend to hyde the scope of
> the class rather than make the code more readable (well, that's my opinion at
> least), I rather prefer to keep things explicit, but if you want I can prepare
> another webrev with the static imports of course.
> The map key seems to always be either a GraphicsPrimitive of some kind or a
> String, while the value should always be an integer array.
> This map is package private, although I didn't find it used elsewhere
> (even a grep in native code) so probably the wildcard will do just fine,
> I would leave it like this to be honest for now.
> Anyway, this is the latest webrev:
> http://cr.openjdk.java.net/~neugens/warning-hackaton/webrev.04/
> Cheers,
> Mario

More information about the 2d-dev mailing list