[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] FYI: JComponent.setMaximumSize()
From: |
David Gilbert |
Subject: |
[cp-patches] FYI: JComponent.setMaximumSize() |
Date: |
Thu, 17 Nov 2005 23:31:13 +0000 |
User-agent: |
Mozilla Thunderbird 1.0.7 (X11/20051026) |
This patch fixes a bug that is showing up when I try to launch FindBugs (I've also
added Mauve tests to back up the change):
2005-11-17 David Gilbert <address@hidden>
* javax/swing/JComponent.java
(setMaximumSize): Check for null argument before making a copy.
Regards,
Dave
Index: javax/swing/JComponent.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/JComponent.java,v
retrieving revision 1.86
diff -u -r1.86 JComponent.java
--- javax/swing/JComponent.java 15 Nov 2005 23:07:23 -0000 1.86
+++ javax/swing/JComponent.java 17 Nov 2005 23:18:00 -0000
@@ -2530,7 +2530,10 @@
public void setMaximumSize(Dimension max)
{
Dimension oldMaximumSize = maximumSize;
- maximumSize = new Dimension(max);
+ if (max != null)
+ maximumSize = new Dimension(max);
+ else
+ maximumSize = null;
firePropertyChange("maximumSize", oldMaximumSize, maximumSize);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [cp-patches] FYI: JComponent.setMaximumSize(),
David Gilbert <=