Hi Tom,

Am Montag, den 15.08.2005, 10:17 -0600 schrieb Tom Tromey:
> >>>>> "Roman" == Roman Kennke <[EMAIL PROTECTED]> writes:
> 
> Roman> FlowLayout.setAlignment used to check for illegal values. However, the
> Roman> JDK does not throw an exception in this case and treats unknown values
> Roman> as FlowLayout.LEFT instead. I fixed and committed this.
> 
> I assume this came from some application passing in an invalid value?

Yeah sure. I have an app here that passes in 10 as alignment.

> Roman>    public void setAlignment (int align)
> Roman>    {
> Roman> -    if (align != LEFT && align != RIGHT && align != CENTER
> Roman> -      && align != LEADING && align != TRAILING)
> Roman> -      throw new IllegalArgumentException ("invalid alignment: " + 
> align);
> Roman>      this.align = align;
> Roman>    }
>  
> It would be nice to have a comment here explaining why we don't do
> the check.

Ok, I'll add this.

/Roman




_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches

Reply via email to