Hi Laurent,

Just a few details I noticed...

In RendererStats, lines 276,277 - is it better to convert to an array (which is an inherently risky situation for a concurrent collection due to the potential for the size changing between the array allocation and the toArray), or to iterate the concurrent collection directly? I realize that the toArray() method protects against a short array, but is it any better than just directly iterating which would deal with the concurrency automatically anyway without having to allocate an array. One thing to note, if you convert to an array and there is a concurrency issue then the array may have a null entry to indicate "this is the end of the list", but you don't look for that null entry. A simple "if rdrCtx==null break;" statement would be enough to deal with that case.

MarlinConst.java - you added DO_FLUSH_STATS, but I don't see it getting used anywhere...?

MarlinRenderingEngine.java - it looks like you eliminated all uses of mon_npi_currentSegment, but it is still created in RendererStats...?

Histogram.java - 2016 copyright

                        ...jim

On 6/8/2016 2:31 PM, Laurent Bourgès wrote:
Hi,

Please review this bug fix for the Marlin renderer to fix coding
conventions:
bug: https://bugs.openjdk.java.net/browse/JDK-8159093
webrev: http://cr.openjdk.java.net/~lbourges/marlin/marlin-8159093.0/

Changes:
- Use capital letters for all constants (static fields)
- Use rdrCtx.stats instead of RendererContext.stats (static to field)
- removed useless imports

PS: this patch is an intermediate step before next Marlin patch

Regards,
Laurent

Reply via email to