[cp-patches] RFA: Component.java Fix

Thomas Fitzsimmons fitzsim at redhat.com
Tue Jun 27 18:51:01 UTC 2006


Tania Bento wrote:
> Hey,
> 
> In the setComponentOrientation(ComponentOrientation) method, a NPE
> should not be thrown if the ComponentOrientation specified is null. This
> patch fixes a mauve failing test
> (gnu/testlet/java/awt/Component/setComponentOrientation.java).
> 
> Could someone please approve this so that I can commit it. Thanks.
> 
> Cheers,
> Tania
> 
> 2006-06-27  Tania Bento  <tbento at redhat.com>
> 
>         * java/awt/Component.java
>         (setComponentOrientation): NPE should not be thrown.
> 
> 
> 
> ------------------------------------------------------------------------
> 
> Index: java/awt/Component.java
> ===================================================================
> RCS file: /cvsroot/classpath/classpath/java/awt/Component.java,v
> retrieving revision 1.126
> diff -u -r1.126 Component.java
> --- java/awt/Component.java	27 Jun 2006 15:33:49 -0000	1.126
> +++ java/awt/Component.java	27 Jun 2006 18:16:04 -0000
> @@ -4844,8 +4844,6 @@
>     */
>    public void setComponentOrientation(ComponentOrientation o)
>    {
> -    if (o == null)
> -      throw new NullPointerException();

Please add a comment here so that no one re-adds this check in the future. 
Otherwise this is fine.

Tom




More information about the Classpath-patches mailing list