classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cp-patches] FYI: FlowLayout fixlet


From: Tom Tromey
Subject: Re: [cp-patches] FYI: FlowLayout fixlet
Date: 15 Aug 2005 10:17:23 -0600
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

>>>>> "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?

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.

Tom




reply via email to

[Prev in Thread] Current Thread [Next in Thread]