Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 91792 invoked from network); 7 Sep 2006 09:59:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 7 Sep 2006 09:59:55 -0000 Received: (qmail 18927 invoked by uid 500); 7 Sep 2006 09:59:55 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 18899 invoked by uid 500); 7 Sep 2006 09:59:55 -0000 Mailing-List: contact harmony-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-commits@incubator.apache.org Received: (qmail 18881 invoked by uid 99); 7 Sep 2006 09:59:55 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Sep 2006 02:59:55 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Sep 2006 02:59:54 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 582FE714301 for ; Thu, 7 Sep 2006 09:56:22 +0000 (GMT) Message-ID: <21181850.1157622982358.JavaMail.jira@brutus> Date: Thu, 7 Sep 2006 02:56:22 -0700 (PDT) From: "Denis Kishenko (JIRA)" To: harmony-commits@incubator.apache.org Subject: [jira] Created: (HARMONY-1403) [classlib][awt] Arc2D doesn't throw IAE for invalid type value MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [classlib][awt] Arc2D doesn't throw IAE for invalid type value -------------------------------------------------------------- Key: HARMONY-1403 URL: http://issues.apache.org/jira/browse/HARMONY-1403 Project: Harmony Issue Type: Bug Components: Classlib Reporter: Denis Kishenko Harmony implementation of Arc2D doesn't validate arc type value while RI does. =============== Test.java ================== import java.awt.geom.*; public class Test { public static void main(String[] argv) { Arc2D arc; try { System.err.println("double"); arc = new Arc2D.Double(1, 2, 3, 4, 5, 6, 17); } catch (IllegalArgumentException e) { e.printStackTrace(); } try { System.err.println("float"); arc = new Arc2D.Float(1, 2, 3, 4, 5, 6, -13); } catch (IllegalArgumentException e) { e.printStackTrace(); } try { System.err.println("double.setarc"); arc = new Arc2D.Double(1, 2, 3, 4, 5, 6, 0); arc.setArcType(11); } catch (IllegalArgumentException e) { e.printStackTrace(); } try { System.err.println("float.setarc"); arc = new Arc2D.Float(1, 2, 3, 4, 5, 6, 0); arc.setArcType(11); } catch (IllegalArgumentException e) { e.printStackTrace(); } } } RI Output ========================== double java.lang.IllegalArgumentException: invalid type for Arc: 17 at java.awt.geom.Arc2D.setArcType(Arc2D.java:872) at java.awt.geom.Arc2D.(Arc2D.java:570) at java.awt.geom.Arc2D$Double.(Arc2D.java:381) at Test.main(Test.java:8) float java.lang.IllegalArgumentException: invalid type for Arc: -13 at java.awt.geom.Arc2D.setArcType(Arc2D.java:872) at java.awt.geom.Arc2D.(Arc2D.java:570) at java.awt.geom.Arc2D$Float.(Arc2D.java:131) at Test.main(Test.java:14) double.setarc java.lang.IllegalArgumentException: invalid type for Arc: 11 at java.awt.geom.Arc2D.setArcType(Arc2D.java:872) at Test.main(Test.java:21) float.setarc java.lang.IllegalArgumentException: invalid type for Arc: 11 at java.awt.geom.Arc2D.setArcType(Arc2D.java:872) at Test.main(Test.java:28) Harmony Output ==================== double float double.setarc float.setarc -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira