Attached is a small test program that doesn't run to completion (i.e. hangs) on JamVM 1.4.1 with a recent CVS version of Classpath. I came across this bug while testing a demo program included with iText (1.3.6). import java.awt.geom.Area; import java.awt.geom.Ellipse2D; public class Test { public static void main(String[] args) { Ellipse2D ellipse1 = new Ellipse2D.Double(75.0, 33.0, 40.0, 40.0); Ellipse2D ellipse2 = new Ellipse2D.Double(78.0, 28.0, 50.0, 50.0); Area a1 = new Area(ellipse1); Area a2 = new Area(ellipse2); a1.subtract(a2); System.out.println(a1); } }
Yup. Confirmed. I knew about this behaviour already though :-/ (Although to my defense, the JDK can hang on some Area operations too.) But having a simple testcase should be a good help in fixing this, so thanks. The goals I think we should have for Area is to never hang, and produce erroneous output less often than the JDK.
Great! The original source for the bug is: http://itextdocs.lowagie.com/examples/com/lowagie/examples/directcontent/graphics2D/G2D.java I was just running some of the example programs to see how well iText runs on GNU Classpath. Most of the ones I've tried "just work" which is good news. Except for the one I linked above, of course.