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.
I'll make an exception for a method where you might
get semi-useful results if it isn't implemented
correctly, but if a class isn't anywhere close to
useful, it shouldn't pretend to be.

That raises the question:  What exception to throw?
We could add a special gnu exception, but I suggest
UnsupportedOperationException.  E.g:

  public URI (String scheme, String ssp, String fragment)
    throws URISyntaxException
  {
    throw new UnsupportedOperationException();
  }
--
        --Per Bothner
[EMAIL PROTECTED]   http://www.bothner.com/per/



_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath

Reply via email to