Graphics2D.drawPolygon(int xPoints[], int yPoints[], int nPoints) fails when arrays are empty and the graphics is scaled.
This caused jck failure, if default graphics transform is not an identity.
Log:
Exception in thread "main" java.awt.geom.IllegalPathStateException: missing initial moveto in path definition
at java.awt.geom.Path2D$Float.needRoom(Path2D.java:280)
at java.awt.geom.Path2D.closePath(Path2D.java:1771)
at sun.java2d.pipe.PixelToShapeConverter.makePoly(PixelToShapeConverter.java:111)
at sun.java2d.pipe.PixelToShapeConverter.drawPolygon(PixelToShapeConverter.java:125)
at sun.java2d.pipe.ValidatePipe.drawPolygon(ValidatePipe.java:140)
at sun.java2d.SunGraphics2D.drawPolygon(SunGraphics2D.java:2279)
Suggested fix:
http://cr.openjdk.java.net/~serb/8004821/webrev.00/