unimplemented methods
Andrew Haley
aph@redhat.com
Sun Mar 2 12:15:00 GMT 2003
=?iso-8859-1?Q?=D8yvind=5FHarboe?= writes:
> > This has to stop. If an method does not do what it
> > is supposed to do, then it must throw an exception.
>
> I think this is generally a good idea. My first encounter
> with this sort of thing was Thread.interrupt(), which is
> a C++ method, though I assume the same rules apply.
>
> Perhaps the behaviour of unimplemented methods could be
> made run-time configurable?
I am strongly opposed to this idea. We have enough bloat as it is:
it's not really our fault, but I don't want any more.
UnsupportedOperationException is a good choice. Any subclass of Error
is not, because according to the spec Error "indicates serious
problems that a reasonable application should not try to catch."
Andrew.
More information about the Java
mailing list