United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-8004821 Graphics2D.drawPolygon() fails with IllegalPathStateException
JDK-8004821 : Graphics2D.drawPolygon() fails with IllegalPathStateException

Details
Type:
Bug
Submit Date:
2012-12-10
Status:
Resolved
Updated Date:
2013-05-21
Project Name:
JDK
Resolved Date:
2013-02-04
Component:
client-libs
OS:
generic
Sub-Component:
2d
CPU:
Priority:
P3
Resolution:
Fixed
Affected Versions:
Fixed Versions:

Related Reports
Backport:
Relates:

Sub Tasks

Description
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/


                                    

Comments
URL:   http://hg.openjdk.java.net/jdk8/2d/jdk/rev/1df2944db538
User:  serb
Date:  2013-02-04 15:54:30 +0000

                                     
2013-02-04
URL:   http://hg.openjdk.java.net/jdk8/jdk8/jdk/rev/1df2944db538
User:  lana
Date:  2013-02-12 18:23:17 +0000

                                     
2013-02-12



Hardware and Software, Engineered to Work Together