[cp-patches] RFA: Component.java Fix

Tom Tromey tromey at redhat.com
Tue Jun 27 18:51:48 UTC 2006


>>>>> "Tania" == Tania Bento <tbento at redhat.com> writes:

Tania> 2006-06-27  Tania Bento  <tbento at redhat.com>
Tania>         * java/awt/Component.java
Tania>         (setComponentOrientation): NPE should not be thrown.

I'm curious about this...

Tania> -    if (o == null)
Tania> -      throw new NullPointerException();
Tania>      ComponentOrientation oldOrientation = orientation;
Tania>      orientation = o;

So the resulting orientation will be null?
I don't know anything about this area, so forgive me if my comments
are misguided.  But, this seems weird.  Does the Mauve test check
the result of a subsequent getComponentOrientation call?

Also, in a case like this it would be nice to update the javadoc to
reflect what happens if null is passed in.  With your patch it will
still claim to throw, which is wrong.

Tom



More information about the Classpath-patches mailing list