classpath-patches
[Top][All Lists]
Advanced

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

[cp-patches] FYI: JComponent.setMinimumSize()


From: David Gilbert
Subject: [cp-patches] FYI: JComponent.setMinimumSize()
Date: Thu, 17 Nov 2005 23:57:26 +0000
User-agent: Mozilla Thunderbird 1.0.7 (X11/20051026)

As for my recent patch for setMaximumSize(), 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
    (setMinimumSize): 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.87
diff -u -r1.87 JComponent.java
--- javax/swing/JComponent.java 17 Nov 2005 23:27:24 -0000      1.87
+++ javax/swing/JComponent.java 17 Nov 2005 23:50:36 -0000
@@ -2547,7 +2547,10 @@
   public void setMinimumSize(Dimension min)
   {
     Dimension oldMinimumSize = minimumSize;
-    minimumSize = new Dimension(min);
+    if (min != null)
+      minimumSize = new Dimension(min);
+    else
+      minimumSize = null;
     firePropertyChange("minimumSize", oldMinimumSize, minimumSize);
   }
 

reply via email to

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