Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 75289 invoked from network); 13 Sep 2006 09:54:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 13 Sep 2006 09:54:51 -0000 Received: (qmail 20721 invoked by uid 500); 13 Sep 2006 09:54:51 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 20615 invoked by uid 500); 13 Sep 2006 09:54:50 -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 20604 invoked by uid 99); 13 Sep 2006 09:54:50 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Sep 2006 02:54:50 -0700 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests= Received: from ([209.237.227.198:35859] helo=brutus.apache.org) by idunn.apache.osuosl.org (ecelerity 2.1 r(10620)) with ESMTP id 8B/61-08832-975D7054 for ; Wed, 13 Sep 2006 02:55:05 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id A310871434F for ; Wed, 13 Sep 2006 09:51:24 +0000 (GMT) Message-ID: <16935579.1158141084663.JavaMail.jira@brutus> Date: Wed, 13 Sep 2006 02:51:24 -0700 (PDT) From: "Mikhail Loenko (JIRA)" To: harmony-commits@incubator.apache.org Subject: [jira] Assigned: (HARMONY-1403) [classlib][awt] Arc2D doesn't throw IAE for invalid type value In-Reply-To: <21181850.1157622982358.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/HARMONY-1403?page=all ] Mikhail Loenko reassigned HARMONY-1403: --------------------------------------- Assignee: Mikhail Loenko > [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 > Assigned To: Mikhail Loenko > Attachments: 1403-Arc2D tests.patch, 1403-Arc2D.patch > > > 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