[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] FYI: AWTEvent toString fix
From: |
Robert Schuster |
Subject: |
[cp-patches] FYI: AWTEvent toString fix |
Date: |
Wed, 13 Jul 2005 15:10:05 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7.8) Gecko/20050514 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
I found out that the special handling of Component and MenuComponent in
AWTEvent.toString() is not done in the JDK.
The former code is responsible for the complaint in bug #13534
(https://savannah.gnu.org/bugs/?func=detailitem&item_id=13534).
2005-07-13 Robert Schuster <address@hidden>
* java/awt/AWTEvent.java:
(toString): Generalized string generation.
cu
Robert
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFC1RKsG9cfwmwwEtoRAtbUAJ9CWv19ltUA040TNT++L/bJ5PIbtgCgm3qj
irdlOP5kb1cdKna2uD+CYFU=
=zjwC
-----END PGP SIGNATURE-----
Index: java/awt/AWTEvent.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/AWTEvent.java,v
retrieving revision 1.15
diff -u -r1.15 AWTEvent.java
--- java/awt/AWTEvent.java 2 Jul 2005 20:32:22 -0000 1.15
+++ java/awt/AWTEvent.java 13 Jul 2005 13:01:18 -0000
@@ -1,3 +1,4 @@
+
/* AWTEvent.java -- the root event in AWT
Copyright (C) 1999, 2000, 2002, 2005 Free Software Foundation
@@ -238,16 +239,7 @@
*/
public String toString ()
{
- String string = null;
-
- if (source instanceof Component)
- string = getClass ().getName () + "[" + paramString () + "] on "
- + ((Component) source).getName ();
- else if (source instanceof MenuComponent)
- string = getClass ().getName () + "[" + paramString () + "] on "
- + ((MenuComponent) source).getName ();
- else
- string = getClass ().getName () + "[" + paramString () + "] on "
+ String string = getClass ().getName () + "[" + paramString () + "] on "
+ source;
return string;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [cp-patches] FYI: AWTEvent toString fix,
Robert Schuster <=