Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 35563 invoked from network); 24 Nov 2006 08:04:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Nov 2006 08:04:27 -0000 Received: (qmail 25545 invoked by uid 500); 24 Nov 2006 08:04:30 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 25511 invoked by uid 500); 24 Nov 2006 08:04:30 -0000 Mailing-List: contact dev-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list dev@harmony.apache.org Received: (qmail 25502 invoked by uid 99); 24 Nov 2006 08:04:29 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Nov 2006 00:04:29 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of alexey.a.petrenko@gmail.com designates 64.233.182.184 as permitted sender) Received: from [64.233.182.184] (HELO nf-out-0910.google.com) (64.233.182.184) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Nov 2006 00:04:05 -0800 Received: by nf-out-0910.google.com with SMTP id a4so1210684nfc for ; Fri, 24 Nov 2006 00:03:43 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=t+GFoPabIofrx4trZnMauXWiNodHzzHQrEIeLdaPhLbo06m1kOhtwb7vXlbruBVJm95AghubnsSzYPxsBAWZyignKdbqQz1p9p3PoRwLvmWrMPdNWcVL6z9Nn7PGVP13aNmnKtBJaCUkuSTjf+Svo7/CElqCRMNRpPofetIzrnM= Received: by 10.78.57.11 with SMTP id f11mr10046246hua.1164355423125; Fri, 24 Nov 2006 00:03:43 -0800 (PST) Received: by 10.78.107.10 with HTTP; Fri, 24 Nov 2006 00:03:43 -0800 (PST) Message-ID: Date: Fri, 24 Nov 2006 11:03:43 +0300 From: "Alexey Petrenko" To: dev@harmony.apache.org Subject: Re: svn commit: r478636 - in /harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt: Canvas.java Component.java Font.java MenuComponent.java Toolkit.java Window.java geom/Area.java In-Reply-To: <8E389A5F2FEABA4CB1DEC35A25CB39CE7834E9@mssmsx411> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <8E389A5F2FEABA4CB1DEC35A25CB39CE7834E9@mssmsx411> X-Virus-Checked: Checked by ClamAV on apache.org 2006/11/24, Ivanov, Alexey A : > >-----Original Message----- > >From: Alexey Petrenko [mailto:alexey.a.petrenko@gmail.com] > >Sent: Friday, November 24, 2006 10:32 AM > >To: dev@harmony.apache.org > >Subject: Re: svn commit: r478636 - in > >/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/ > awt: > >Canvas.java Component.java Font.java MenuComponent.java Toolkit.java > >Window.java geom/Area.java > > > >2006/11/23, Tim Ellison : > >> apetrenko@apache.org wrote: > >> > - public void add(Area area) { > >> > + public void add(Area area) throws > >org.apache.harmony.luni.util.NotImplementedException { > >> > throw new RuntimeException("Not implemented"); > //$NON-NLS-1$ > >> > } > >> Sorry if I'm getting annoying ;-) but why not : > >> (1) import the NotYetImplementedException like we do everywhere else > for > >> type we reference, and > >It's just easier to remove. Remove it soon I hope :) > Eclipse easily handles adding and removing imports for you. Just press > Ctrl+Shift+O -- it's done. (I believe IDEA supports this too.) And the > code is clearer without these long package names :) I do not use Eclipse, Idea or other IDE. And this code is used in small number of special cases. Where you should not think about "code clearance" but should think about code implementation :) > >> (2) actually throw it rather than a generic RuntimeException? > +1 for throwing NIE. > >What for? User will see that the method is not implemented anyway :) > >japitools does not look inside. > >It does not matter anyway. > But why not throwing NIE? That's not an argument :) > It's easier: you don't need to type in the message and adding > non-localizable comment. In case of marking unimplemented methods which are ALREADY in the code base you do not need to type any comment :) If you are adding a new unimplemented method then it is logical to use NotImplementedException from the begining. > And again it's clearer: you'll see instance of NIE in stack trace. Or "not implemented" message in the same stacktrace. Does not really matter... SY, Alexey