Hi,
this makes my new JComponent mauve test pass. It protects the
preferredSize field by creating a new Dimension object from it before
returning the value. (Sidenote: yes, all the getPreferredSize() mauve
tests should be 'ported' to getMinimumSize() and getMaximumSize() also
and JComponent be fixed. I expect similar (expected) behaviour for these
methods. I'll do this asap).
2005-12-15 Roman Kennke <[EMAIL PROTECTED]>
* javax/swing/JComponent.java
(getPreferredSize): Protect the preferredSize field from
modification by creating a new Dimension object from it
before returning the value.
/Roman
Index: javax/swing/JComponent.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/JComponent.java,v
retrieving revision 1.93
diff -u -r1.93 JComponent.java
--- javax/swing/JComponent.java 12 Dec 2005 13:21:23 -0000 1.93
+++ javax/swing/JComponent.java 15 Dec 2005 17:47:24 -0000
@@ -1294,7 +1294,7 @@
{
Dimension prefSize = null;
if (preferredSize != null)
- prefSize = preferredSize;
+ prefSize = new Dimension(preferredSize);
else if (ui != null)
{
_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches