You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Tim Ellison <t....@gmail.com> on 2006/11/23 20:28:25 UTC

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

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
(2) actually throw it rather than a generic RuntimeException?

Regards,
Tim

-- 

Tim Ellison (t.p.ellison@gmail.com)
IBM Java technology centre, UK.

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

Posted by "Geir Magnusson Jr." <ge...@pobox.com>.
but it makes the code much clearer

geir


Alexey Petrenko wrote:
> 2006/11/23, Tim Ellison <t....@gmail.com>:
>> 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 :)
> 
>> (2) actually throw it rather than a generic RuntimeException?
> What for? User will see that the method is not implemented anyway :)
> japitools does not look inside.
> It does not matter anyway.

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

Posted by Alexey Petrenko <al...@gmail.com>.
2006/11/23, Tim Ellison <t....@gmail.com>:
> 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 :)

> (2) actually throw it rather than a generic RuntimeException?
What for? User will see that the method is not implemented anyway :)
japitools does not look inside.
It does not matter anyway.

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

Posted by "Geir Magnusson Jr." <ge...@pobox.com>.
+1

Tim Ellison wrote:
> 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
> (2) actually throw it rather than a generic RuntimeException?
> 
> Regards,
> Tim
>