classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: unimplemented methods


From: Aaron M. Renn
Subject: Re: unimplemented methods
Date: Sat, 1 Mar 2003 19:33:25 -0600
User-agent: Mutt/1.4i

Per Bothner (address@hidden) wrote:
> I just looked at a couple of classes (java.net.URI
> and java.awt.GridBagLayout) and noticed lots of
> unimplemented methods just do nothing or return null.
> 
> This has to stop.  If an method does not do what it
> is supposed to do, then it must throw an exception.
...
> That raises the question:  What exception to throw?
> We could add a special gnu exception, but I suggest
> UnsupportedOperationException.  E.g:

In several cases, an Error("Not implemented yet") is
thrown.  I'm in complete agreement that unimplemented
methods should throw some type of exception.  Also
the source code should be prominently marked with
FIXME or XXX indicating work to be done.

-- 
Aaron M. Renn (address@hidden) http://www.urbanophile.com/arenn/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]