Re: [OpenJDK 2D-Dev] Review request for bug 100053

2009-10-02 Thread Jim Graham
That looks fine. A note on code style, though. The following form would better match the indentation/continuation style used in the rest of this file and the 2D code: 781 if (crossingIndices != null && 782 crossingIndices.length > DEFAULT_INDICES_SIZE) 783 {

Re: [OpenJDK 2D-Dev] Review request for bug 100053

2009-10-02 Thread Roman Kennke
Hi Jim, I think you are right. I think the idea is to keep the array around to avoid massive load on the GC. And if the array needs to be grown (i.e. very rarely), it gets shrinked back to default size. So I would go with: > Shouldn't it be "if (array != null && array.length > DEFAULT)"? The u

Re: [OpenJDK 2D-Dev] Review request for bug 100053

2009-10-01 Thread Jim Graham
I could go too ways on this. It looks like the code is looking to drop arrays that have grown so that it doesn't waste memory. Do we reuse these objects? If not, then the code can be deleted. If we do reuse them, then why not just set them to null and let them get recreated the next time r

Re: [OpenJDK 2D-Dev] Review request for bug 100053

2009-10-01 Thread Dmitri Trembovetski
Hi Roman, Roman Kennke wrote: Hi Dmitri, a comment about the test: would the bug reproduce if you just rendered into a BufferedImage? If so, no need for creating a frame and such. Oh yes. Stupid me :-) Regarding the fix, it looks ok - but there are other places in the code where t

Re: [OpenJDK 2D-Dev] Review request for bug 100053

2009-10-01 Thread Roman Kennke
Hi Dmitri, >a comment about the test: would the bug reproduce if you just rendered > into a > BufferedImage? If so, no need for creating a frame and such. Oh yes. Stupid me :-) >Regarding the fix, it looks ok - but there are other places in the code > where > the 'crossings' is acces

Re: [OpenJDK 2D-Dev] Review request for bug 100053

2009-10-01 Thread Dmitri Trembovetski
Hi Roman, a comment about the test: would the bug reproduce if you just rendered into a BufferedImage? If so, no need for creating a frame and such. Regarding the fix, it looks ok - but there are other places in the code where the 'crossings' is accessed - are those safe from an NPE?

[OpenJDK 2D-Dev] Review request for bug 100053

2009-10-01 Thread Roman Kennke
Hi guys, This patch here fixes the NPE in Pisces renderer as reported in: https://bugs.openjdk.java.net/show_bug.cgi?id=100053 The webrev is here: http://cr.openjdk.java.net/~rkennke/100053/webrev.00/ It basically adds nullchecks in the offending code. As far as I can see this should be suffic