This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: unimplemented methods


Per Bothner (per at bothner dot com) 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 (arenn at urbanophile dot com) http://www.urbanophile.com/arenn/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]