Am Freitag, den 25.11.2005, 14:58 +0100 schrieb Mark Wielaard:
> Hi,
> 
> On Tue, 2005-11-22 at 01:03 +0100, Mark Wielaard wrote:
> > This one is a little strange. Apparently the plastic laf overrides
> > getIconForTab(int) and returns null in certain cases. But then it still
> > calls paintIcon on it. I cannot find too much documentation on this, but
> > this seems the correct thing to do:
> > 
> > 2005-11-21  Mark Wielaard  <[EMAIL PROTECTED]>
> > 
> >     * javax/swing/plaf/basic/BasicTabbedPaneUI.java (paintIcon): Only
> >     paint icon when not null.
> > 
> > Comments?
> 
> Several people on irc said that they found it strange, but saw no
> problem with it since it fixes a real current problem.

I think this is quite common in the laf classes. They have to deal with
possible null value because the methods are intended to be overridden in
most cases and the implementation therefore cannot guarantee that some
field or method does not return null. I have also seen this in various
other UI classes as well.

/Roman

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil

_______________________________________________
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches

Reply via email to