[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] FYI: LookAndFeel.toString() fixlet
From: |
Mark Wielaard |
Subject: |
[cp-patches] FYI: LookAndFeel.toString() fixlet |
Date: |
Wed, 07 Dec 2005 01:45:57 +0100 |
Hi,
Riccardo reported a bug off list about code that tried to parse the
LookAndFeel.toString() result to find the actual Class name of the
LookAndFeel subclass. Although this is highly questionable the big Swing
book does indeed that toString() returns a string based on the
description and class name. And we currently returned something very
non-descriptive, so I updated it as follows:
2005-12-06 Mark Wielaard <address@hidden>
* javax/swing/LookAndFeel.java (toString): Include description and
Class name.
Committed,
Mark
diff -u -r1.15 LookAndFeel.java
--- javax/swing/LookAndFeel.java 20 Oct 2005 18:58:46 -0000 1.15
+++ javax/swing/LookAndFeel.java 6 Dec 2005 17:26:45 -0000
@@ -300,11 +300,11 @@
/**
* Returns a string that displays and identifies this object's properties.
*
- * @return the string "LookAndFeel"
+ * @return string containing the description and class name.
*/
public String toString()
{
- return "LookAndFeel";
+ return getDescription() + " " + getClass().getName();
}
/**
- [cp-patches] FYI: LookAndFeel.toString() fixlet,
Mark Wielaard <=