[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cp-patches] FYI: FlowLayout fixlet
From: |
Roman Kennke |
Subject: |
Re: [cp-patches] FYI: FlowLayout fixlet |
Date: |
Tue, 16 Aug 2005 11:20:35 +0200 |
Hi Tom,
Am Montag, den 15.08.2005, 10:17 -0600 schrieb Tom Tromey:
> >>>>> "Roman" == Roman Kennke <address@hidden> 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