classpath-patches
[Top][All Lists]
Advanced

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

[cp-patches] FYI:fix for AWTEvent


From: Robert Schuster
Subject: [cp-patches] FYI:fix for AWTEvent
Date: Wed, 09 Mar 2005 06:08:48 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7.5) Gecko/20050107

AWTEvent.toString() returned null when source was not a Component or MenuComponent.

Creates the string even if the type of the source object is not from the AWT.

2005-03-09  Robert Schuster <address@hidden>

   * java/awt/AWTEvent.java (toString): Added case
   for source not being an AWT component.

Index: java/awt/AWTEvent.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/AWTEvent.java,v
retrieving revision 1.13
diff -u -r1.13 AWTEvent.java
--- java/awt/AWTEvent.java      16 Feb 2005 10:39:25 -0000      1.13
+++ java/awt/AWTEvent.java      9 Mar 2005 05:06:05 -0000
@@ -1,5 +1,5 @@
 /* AWTEvent.java -- the root event in AWT
-   Copyright (C) 1999, 2000, 2002 Free Software Foundation
+   Copyright (C) 1999, 2000, 2002, 2005 Free Software Foundation
 
 This file is part of GNU Classpath.
 
@@ -246,6 +246,9 @@
     else if (source instanceof MenuComponent)
       string = getClass ().getName () + "[" + paramString () + "] on "
         + ((MenuComponent) source).getName ();
+    else 
+      string = getClass ().getName () + "[" + paramString () + "] on "
+    + source;
 
     return string;
   }

reply via email to

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