From ccfe7d0a0d5eee9236cb5bcf3e0216e4ce1e96e5 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sat, 18 Dec 1999 00:44:00 +0000 Subject: [PATCH] re GNATS libgcj/111 (bug in reflection code) * java/lang/reflect/Method.java (toString): Call getType if required. Partial fix for PR libgcj/111. From Per Bothner. From-SVN: r31002 --- libjava/ChangeLog | 3 +++ libjava/java/lang/reflect/Method.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 3a6aff1ed2f..bb0f2256c47 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,5 +1,8 @@ 1999-12-17 Tom Tromey + * java/lang/reflect/Method.java (toString): Call getType if + required. Partial fix for PR libgcj/111. From Per Bothner. + * java/lang/natPosixProcess.cc (startProcess): Don't use sprintf. 1999-12-16 Bryce McKinlay diff --git a/libjava/java/lang/reflect/Method.java b/libjava/java/lang/reflect/Method.java index 01e830876e5..e7f697f11ec 100644 --- a/libjava/java/lang/reflect/Method.java +++ b/libjava/java/lang/reflect/Method.java @@ -73,6 +73,9 @@ public final class Method extends AccessibleObject implements Member public String toString () { + if (parameter_types == null) + getType (); + StringBuffer b = new StringBuffer (); b.append(Modifier.toString(getModifiers())); b.append(" ");