This is the mail archive of the java-patches@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Patch: Method.toString() fix


I'm committing the appended fix.  It fixes a bug in Method.toString
identified by Godmar; the fix is from Per Bothner.

1999-12-17  Tom Tromey  <tromey@cygnus.com>

	* java/lang/reflect/Method.java (toString): Call getType if
	required.  Partial fix for PR libgcj/111.  From Per Bothner.

Tom

Index: java/lang/reflect/Method.java
===================================================================
RCS file: /cvs/java/libgcj/libjava/java/lang/reflect/Method.java,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 Method.java
--- Method.java	1999/04/07 14:52:39	1.1.1.1
+++ Method.java	1999/12/18 00:37:52
@@ -73,6 +73,9 @@
 
   public String toString ()
     {
+      if (parameter_types == null)
+	getType ();
+
       StringBuffer b = new StringBuffer ();
       b.append(Modifier.toString(getModifiers()));
       b.append(" ");

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]